Pārlūkot izejas kodu

clean up the handling of the puppeteer install

Steven Silvester 4 gadi atpakaļ
vecāks
revīzija
d93f54f46f
1 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  1. 2 1
      jupyterlab/browser_check.py

+ 2 - 1
jupyterlab/browser_check.py

@@ -150,7 +150,8 @@ async def run_browser(url):
     """
     target = osp.join(get_app_dir(), 'browser_test')
     if not osp.exists(osp.join(target, 'node_modules')):
-        os.makedirs(osp.join(target, 'node_modules'))
+        if not osp.exists(target):
+            os.makedirs(osp.join(target))
         await run_async_process(["jlpm", "init", "-y"], cwd=target)
         await run_async_process(["jlpm", "add", "puppeteer@^4"], cwd=target)
     shutil.copy(osp.join(here, 'chrome-test.js'), osp.join(target, 'chrome-test.js'))