소스 검색

Fix node_modules removal

Steven Silvester 7 년 전
부모
커밋
4ae3c78201
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      jupyterlab/commands.py

+ 2 - 1
jupyterlab/commands.py

@@ -222,7 +222,8 @@ def install_extension_async(extension, app_dir=None, logger=None, abort_callback
     # Remove any existing package from staging/node_modules to force
     # npm to re-install it from the tarball.
     target = pjoin(app_dir, 'staging', 'node_modules', data['name'])
-    shutil.rmtree(target)
+    if os.path.exists(target):
+        shutil.rmtree(target)
 
 
 def link_package(path, app_dir=None, logger=None):