mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
makeScriptWrapper: warn if target file does not exist
This commit is contained in:
parent
b8de2d206a
commit
8748d67aac
1 changed files with 2 additions and 0 deletions
|
|
@ -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"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue