Skip to content

Commit d5359bf

Browse files
committed
我还是用 shutil 吧
1 parent c118d65 commit d5359bf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

script/install-daemon.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import os
55
import subprocess
66
import sys
7+
import shutil
78
from uuid import uuid4 as uuid
89

910
# ----- for dev testing
@@ -154,7 +155,7 @@ def main():
154155
if okis.lower() == 'n' or okis.lower() == 'no' or (not okis):
155156
print('取消安装.')
156157
return 1
157-
os.removedirs(base)
158+
shutil.rmtree(base)
158159
os.mkdir(base)
159160
# --- 1. pm2
160161
if not dev_bypass_install_pm2:

0 commit comments

Comments
 (0)