bugfix preview script
This commit is contained in:
parent
44b6adef45
commit
b8f7e59246
1 changed files with 6 additions and 3 deletions
|
@ -45,12 +45,15 @@ text() {
|
||||||
run() {
|
run() {
|
||||||
#shellcheck disable=SC2068
|
#shellcheck disable=SC2068
|
||||||
if ! command -v "$1" >/dev/null 2>&1; then
|
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
|
exit 1
|
||||||
elif $@; then
|
elif "$@"; then
|
||||||
exit 1
|
exit 1
|
||||||
else
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue