summaryrefslogtreecommitdiff
path: root/setup
diff options
context:
space:
mode:
authorZev Weiss <zev@bewilderbeest.net>2022-01-28 08:15:13 +0300
committerPatrick Williams <patrick@stwcx.xyz>2022-01-28 15:39:08 +0300
commit1ebfa83c9f0581514a59a93ad556b942857d2290 (patch)
treece96cdedfd42d320f3d6ac2d3d7c3ee39bd38a30 /setup
parent06dc9ae43efa20c28b97c5f2b397f1cd2b8439cd (diff)
downloadopenbmc-1ebfa83c9f0581514a59a93ad556b942857d2290.tar.xz
setup: handle invalid machine argument more gracefully
If 'setup' is sourced with an invalid machine name, the error message is now sent to stderr and the failure is propagated back up the stack with a non-zero return value. Change-Id: I50ad40b58c1479ce9ee80ea52536075eddd09b4c Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Diffstat (limited to 'setup')
-rwxr-xr-xsetup2
1 files changed, 1 insertions, 1 deletions
diff --git a/setup b/setup
index 3b54c0c827..cc3414ce17 100755
--- a/setup
+++ b/setup
@@ -76,7 +76,7 @@ machine() {
fi
done
- [ -n "$target" ] && echo "No such machine!"
+ [ -n "$target" ] && echo "No such machine!" >&2 && return 1
}
if [ -z "$1" ]; then