Procházet zdrojové kódy

clean up the handling of the puppeteer install

Steven Silvester před 4 roky
rodič
revize
d93f54f46f
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  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'))