mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-05-03 14:07:24 +00:00
kata-deploy: Return exit code for invalid argument
It hangs when invalid arguments are specified. ```bash kata-deploy-6sr2p:/# /opt/kata-artifacts/scripts/kata-deploy.sh xxx Action: * xxx ... Usage: /opt/kata-artifacts/scripts/kata-deploy.sh [install/cleanup/reset] ERROR: invalid arguments ... ^C <- hang ``` I changed it to behave the same as when there are no arguments. ```bash kata-deploy-6sr2p:/# /opt/kata-artifacts/scripts/kata-deploy.sh Usage: /opt/kata-artifacts/scripts/kata-deploy.sh [install/cleanup/reset] ERROR: invalid arguments kata-deploy-6sr2p:/# echo $? 1 ``` Fixes: #11068 Signed-off-by: Shunsuke Kimura <pbrehpuum@gmail.com>
This commit is contained in:
parent
810a6dafad
commit
e5d7414c33
@ -909,8 +909,8 @@ function main() {
|
|||||||
reset_runtime $runtime
|
reset_runtime $runtime
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo invalid arguments
|
|
||||||
print_usage
|
print_usage
|
||||||
|
die "invalid arguments"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user