Skip to content

Commit

Permalink
makeBinaryWrapper: warn if target file does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
amozeo committed Feb 24, 2025
1 parent 8748d67 commit bd17e51
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkgs/by-name/ma/makeBinaryWrapper/make-binary-wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ set -euo pipefail
# assertExecutable FILE
assertExecutable() {
local file="$1"
[[ -e "$file" ]] || \
die "Cannot wrap '$file' because it does not exist"
[[ -f "$file" && -x "$file" ]] || \
die "Cannot wrap '$file' because it is not an executable file"
}
Expand Down

0 comments on commit bd17e51

Please sign in to comment.