Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make{Script; Binary}Wrapper: log if target file does not exist #384765

Open
wants to merge 2 commits into
base: staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pkgs/build-support/setup-hooks/make-wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# 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
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