浏览代码

Add exclude list for clean:slate script

To prevent removing IDE configuration.
Jeremy Tuloup 6 年之前
父节点
当前提交
5c58cf4d04
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      clean.py

+ 6 - 1
clean.py

@@ -13,6 +13,11 @@ if os.name == 'nt':
             dnames.remove('node_modules')
 
 
-subprocess.check_call(['git', 'clean', '-dfx'], cwd=here)
+git_clean_exclude = [
+    '-e',
+    '/.vscode',
+]
+git_clean_command = ['git', 'clean', '-dfx'] + git_clean_exclude
+subprocess.check_call(git_clean_command, cwd=here)
 
 subprocess.call('python -m pip uninstall -y jupyterlab'.split(), cwd=here)