瀏覽代碼

clean up the handling of the puppeteer install

Steven Silvester 4 年之前
父節點
當前提交
d93f54f46f
共有 1 個文件被更改,包括 2 次插入1 次删除
  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'))