diff options
| author | Teddy Wing | 2022-05-08 19:05:52 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2022-05-08 19:06:40 +0200 | 
| commit | 4d505d1a684a34af9887d25ed46101cde2622050 (patch) | |
| tree | 16e84b8ef1572da7e80477ab9e3e004501269e05 /src | |
| parent | 9f26a100905907be30a78053758d626661a50376 (diff) | |
| download | wajir-4d505d1a684a34af9887d25ed46101cde2622050.tar.bz2 | |
option.lisp: Only error if required arguments are missing
I forgot the condition that only errors when the required arguments are
missing.
Diffstat (limited to 'src')
| -rw-r--r-- | src/option.lisp | 11 | 
1 files changed, 6 insertions, 5 deletions
diff --git a/src/option.lisp b/src/option.lisp index e2af930..a37779c 100644 --- a/src/option.lisp +++ b/src/option.lisp @@ -99,12 +99,13 @@ with code `exit-code`."                               #'(lambda (missing-and-opt) (first missing-and-opt))                               opts-missing-p)))) -      (format -        *error-output* -        "error: missing required options: ~{`~(--~A~)'~^, ~}~%" -        missing-opts) +      (when (not (null missing-opts)) +        (format +          *error-output* +          "error: missing required options: ~{`~(--~A~)'~^, ~}~%" +          missing-opts) -      (opts:exit sysexits:+usage+)) +        (opts:exit sysexits:+usage+)))      ;; If `sendmail` is given, `email-to` must be defined.      (when (not (null (getf options :sendmail)))  | 
