Просмотр исходного кода

Add exclude list for clean:slate script

To prevent removing IDE configuration.
Jeremy Tuloup 6 лет назад
Родитель
Сommit
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)