Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better command identification when CLI command fails #232

Open
JonJagger opened this issue May 19, 2024 · 0 comments
Open

Better command identification when CLI command fails #232

JonJagger opened this issue May 19, 2024 · 0 comments

Comments

@JonJagger
Copy link
Contributor

JonJagger commented May 19, 2024

The cyber-dojo live-snyk-scans run a script which attests the result of each snyk scan twice, once for the Trail representing the live-snyk-scan, and once more for the original Trail that built the Artifact

snyk container test ...
kosli attest snyk ...
kosli attest snyk ...

Several times I have got an error in one of the kosli attest snyk commands and it is very difficult to tell which attest-snyk command is failing (this is in a script remember). It is sufficiently tricky that I now do a set +e/set -e around the attest-snyk command and do my own error reporting.
See https://github.com/cyber-dojo/live-snyk-scans/blob/7b967a8dd6140a5b987a22d9673cad8b37fd656b/snyk_scan_live_artifacts_and_attest_to_kosli.sh#L120

It would be good, when a CLI command fails, if it could print the command, the Flow, and the Trail, as well as the diagnostic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant