makeBinaryWrapper: warn if target file does not exist

This commit is contained in:
Wroclaw
2025-02-24 14:25:17 +01:00
parent 8748d67aac
commit bd17e51cde

View File

@@ -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"
}