mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-18 14:41:18 +00:00
makeBinaryWrapper: warn if target file does not exist
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user