Skip to content

Commit 0065368

Browse files
authored
fix: correct find -perm option for macos (#272)
1 parent 0138eb1 commit 0065368

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

scripts/core/dot.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,13 @@ dot::list_scripts() {
2525
}
2626

2727
dot::list_scripts_path() {
28-
dotly_contexts=$(find "$DOTLY_PATH/scripts" -maxdepth 2 -perm /+111 -type f | grep -v "$DOTLY_PATH/scripts/core")
29-
dotfiles_contexts=$(find "$DOTFILES_PATH/scripts" -maxdepth 2 -perm /+111 -type f)
28+
if platform::is_macos; then
29+
dotly_contexts=$(find "$DOTLY_PATH/scripts" -maxdepth 2 -perm -111 -type f | grep -v "$DOTLY_PATH/scripts/core")
30+
dotfiles_contexts=$(find "$DOTFILES_PATH/scripts" -maxdepth 2 -perm -111 -type f)
31+
else
32+
dotly_contexts=$(find "$DOTLY_PATH/scripts" -maxdepth 2 -perm /+111 -type f | grep -v "$DOTLY_PATH/scripts/core")
33+
dotfiles_contexts=$(find "$DOTFILES_PATH/scripts" -maxdepth 2 -perm /+111 -type f)
34+
fi
3035

3136
printf "%s\n%s" "$dotly_contexts" "$dotfiles_contexts" | sort -u
3237
}

0 commit comments

Comments
 (0)