Skip to content

Commit

Permalink
fix(upsearch): find complains about -name. Fix #1286
Browse files Browse the repository at this point in the history
  • Loading branch information
denysdovhan committed Nov 9, 2022
1 parent e94a03f commit 5e8b7c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils.zsh
Expand Up @@ -151,7 +151,7 @@ spaceship::upsearch() {
while [ "$root" ]; do
# For every file as an argument
for file in "${files[@]}"; do
local filepath="$(find $root -maxdepth 1 -name $file -print -quit)"
local filepath="$(find $root -maxdepth 1 -name $file -print -quit 2>/dev/null)"
if [[ -n "$filepath" ]]; then
[[ -z "$silent" ]] && echo "$filepath"
return 0
Expand Down

0 comments on commit 5e8b7c0

Please sign in to comment.