Closed JonZeolla closed 1 year ago
I'm not certain if this is the correct way to escape directory separators, I tried the same approach with bash redirect instead with no luck:
❯ syft alpine:latest -o json --name crazy > /tmp/example\/example.json
zsh: no such file or directory: /tmp/example/example.json
❯ syft alpine:latest -o json --name crazy > "/tmp/example\/example.json"
zsh: no such file or directory: /tmp/example\/example.json
❯ syft alpine:latest -o json --name crazy > '/tmp/example\/example.json'
zsh: no such file or directory: /tmp/example\/example.json
I think syft's behavior with creating the directory helps the user and is not a surprising result relative to the bash redirection case listed above.
I'm going to close this for now as a "wont-fix" but please feel free to comment with more thoughts in case I've mischaracterized something here.
Please provide a set of steps on how to reproduce the issue
What happened: When I attempted to make an output file containing a
/
, instead it created a folder structure.What you expected to happen: I expected to be able to include a string literal
/
in the output file name without escaping. As a workaround, I expected to be able to manually escape the/
.Anything else we need to know?: Nah
Environment:
syft version
:syft 0.62.1
cat /etc/os-release
or similar):macOS 13.0.1 (22A400)