Skip to content

Commit b3c3488

Browse files
committed
Make recursive delete more portable
1 parent 2c80d3a commit b3c3488

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

notes

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,8 @@ new_note() {
134134
remove_note() {
135135
local rm_args=()
136136
if [[ "$1" == "-r" || "$1" == "--recursive" ]]; then
137-
# checks for macos, as it doesn't support long arguments for rm
138-
if [[ "$OSTYPE" == "darwin"* ]]; then
139-
rm_args+=("-r")
140-
else
141-
rm_args+=("--recursive")
142-
fi
137+
# -r is more portable than recursive, supported in some envs e.g. OSX, Busybox
138+
rm_args+=("-r")
143139
shift
144140
fi
145141

0 commit comments

Comments
 (0)