We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f8445be commit aee4d3bCopy full SHA for aee4d3b
src/plugins/terminal/scripts/rm-wrapper.sh
@@ -10,20 +10,18 @@ unlink_recursive() {
10
esac
11
unlink_recursive "$entry"
12
done 2>/dev/null
13
-
14
- # Then try to remove the path itself
15
- if rmdir "$path" 2>/dev/null; then
16
- :
17
- elif unlink "$path" 2>/dev/null; then
18
19
- else
20
21
- fi
+
+ unlink "$path" 2>/dev/null || :
22
}
23
24
for target in "$@"; do
25
- echo "Unlinking broken symlinks..."
26
unlink_recursive "$target"
27
done
28
29
-busybox rm "$@"
+busybox rm "$@"
+# Run busybox rm, capture stderr, and filter out the "No such file or directory" message
+err="$(busybox rm "$@" 2>&1 >/dev/null)"
+# Print only real errors
+printf "%s\n" "$err" | grep -v "No such file or directory"
0 commit comments