on master help sign in
[fix] do not spit out error messages for utils/lxc.sh --help

Error:: $ utils/lxc.sh --help ERROR: missing command lxc ... This breaks also docs build:: $ make docs ... WARNING: Unexpected return code 42 from command '../utils/lxc.sh --help' ... Signed-off-by: Markus Heiser <markus@darmarit.de>

commitc5fe65a6e7d4418f97f2ddbfa2586e915f0780d2 authorMarkus Heiser <markus@darmarit.de> dateMon 22 Feb 2021, 20:10 (6 years ago) parentba2cea8
1 file changed+2−2
utils/lxc.sh+2−2
utils/lxc.sh+2−2
@@ -142,11 +142,11 @@ main() {
142142 local _usage="unknown or missing $1 command $2"
143143
144144 # don't check prerequisite when in recursion
145− if [[ ! $1 == __* ]]; then
145+ if [[ ! $1 == __* ]] && [[ ! $1 == --help ]]; then
146146 if ! in_container; then
147147 ! required_commands lxc && lxd_info && exit 42
148148 fi
149− [[ -z $LXC_SUITE ]] && err_msg "missing LXC_SUITE" && exit 42
149+ [[ -z $LXC_SUITE ]] && err_msg "missing LXC_SUITE" && exit 42
150150 fi
151151
152152 case $1 in