1
0
Fork 0

bugfix preview script

This commit is contained in:
Luca Bilke 2024-03-21 13:09:36 +01:00
parent 44b6adef45
commit b8f7e59246
1 changed files with 6 additions and 3 deletions

View File

@ -45,12 +45,15 @@ text() {
run() {
#shellcheck disable=SC2068
if ! command -v "$1" >/dev/null 2>&1; then
printf "%b" "${RED}Cannot execute $1${RESET}"
printf "%b" "${RED}Cannot execute ${1}${RESET}"
exit 1
elif $@; then
elif "$@"; then
exit 1
else
printf "%b" "${RED}Failed to run command: $*${RESET}"
printf "%b" "${RED}Failed to run command: ${RESET}"
for l in "$@"; do
printf "%b" "\n${RED} ${l}${RESET}"
done
exit 1
fi
}