Skip to content

Commit ab922cb

Browse files
committed
cli: show help
1 parent d9fc0b5 commit ab922cb

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

codapi-cli

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ set -euo pipefail
44
sandboxes_dir="sandboxes"
55

66
main() {
7-
if [ "$#" -lt 2 ]; then
7+
if [[ "$#" -eq 1 && ("$1" == "-h" || "$1" == "--help") ]]; then
88
do_help
9+
exit 0
10+
fi
11+
if [ "$#" -lt 2 ]; then
12+
echo "Usage: $0 <resource> <command> [args...]"
913
exit 1
1014
fi
1115

0 commit comments

Comments
 (0)