From 7b70a6e51d4f0a920329b0e293b7f64cc0860b89 Mon Sep 17 00:00:00 2001 From: Victor Westerlund Date: Mon, 6 Apr 2026 11:17:12 +0200 Subject: [PATCH] fix: accept at least one argument (#11) We should accept at least one argument since we made the second argument optional in #9 Reviewed-on: https://codeberg.org/vlw/curl/pulls/11 --- curl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curl.sh b/curl.sh index 4cb6b42..1c66e78 100755 --- a/curl.sh +++ b/curl.sh @@ -1,7 +1,7 @@ #!/bin/bash # Check if the correct number of arguments is provided -if [ "$#" -ne 1 ]; then +if [ -z "${1:-}" ]; then echo "Usage: $0 [request_method]" exit 1 fi