Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions faq/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,22 +100,19 @@ Archiving policies isn't available yet. If this is something you'd find useful,

Flags with values can usually be specified with an `=` or with a **space** as a separator.
For example, `--artifact-type=file` or `--artifact-type file`.
However, an explicitly specified boolean flag value **must** use an `=`.
For example, if you try this:
Boolean flags accept both forms from CLI v2.36.0 onwards:
```
kosli attest generic Dockerfile --artifact-type file --compliant true ...
kosli attest generic Dockerfile --artifact-type file --compliant false ...
```
You will get an error stating:
On earlier versions an explicitly specified boolean flag value **must** use an `=`.
Either upgrade the CLI, or write the flag as `--compliant=false`.
Without the `=` the command above fails with:
```
Error: accepts at most 1 arg(s), received 2
```
Here, `--artifact-type file` is parsed as if it was `--artifact-type=file`, leaving:
because `--compliant` is parsed as if *implicitly* defaulting to `--compliant=true`, leaving:
```
kosli attest generic Dockerfile --compliant true ...
kosli attest generic Dockerfile false ...
```
Then `--compliant` is parsed as if *implicitly* defaulting to `--compliant=true`, leaving:
```
kosli attest generic Dockerfile true ...
```
The parser then sees `Dockerfile` and `true` as the two
The parser then sees `Dockerfile` and `false` as the two
arguments to `kosli attest generic`.