Skip to content

Commit e3dfa9c

Browse files
committed
fix: Don't show error if fsmonitor--daemon not running
Fixed an issue where "zmk module remove" would display an error when attempting to stop Git's fsmonitor--daemon so it can delete the module, but fsmonitor--daemon was not running. We now silently ignore the error.
1 parent 5e7ccd4 commit e3dfa9c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

zmk/commands/module/remove.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,12 @@ def remove_readonly(func, path, _):
8080
with spinner("Deleting module files."):
8181
try:
8282
# Make sure Git isn't locking the folder first.
83-
subprocess.call(["git", "fsmonitor--daemon", "stop"], cwd=module_path)
83+
subprocess.call(
84+
["git", "fsmonitor--daemon", "stop"],
85+
cwd=module_path,
86+
stdout=subprocess.DEVNULL,
87+
stderr=subprocess.DEVNULL,
88+
)
8489

8590
shutil.rmtree(module_path, onexc=remove_readonly)
8691
except FileNotFoundError:

0 commit comments

Comments
 (0)