You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: step context list should print an error to stderr and exit 1 if there are no contexts present #879
I am looking for a way to tell if STEPPATH is using contexts or not.
$ export STEPPATH=/tmp/tmpsteppath
$ step ca bootstrap --ca-url https://my.cool.ca.smallstep.com --fingerprint myfingerprint
$ step context list
$ echo $?
0
If STEPPATH is not using a context step context list should output that there are no contexts present to stderr and exit 1
Your Environment
Fedora Linux 37
$ step version
Smallstep CLI/0.23.4 (linux/amd64)
Expected Behavior
$ export STEPPATH=/tmp/tmpsteppath
$ step ca bootstrap --ca-url https://my.cool.ca.smallstep.com --fingerprint myfingerprint
$ step context list
Error: There are no contexts to list
$ echo $?
1
Actual Behavior
$ export STEPPATH=/tmp/tmpsteppath
$ step ca bootstrap --ca-url https://my.cool.ca.smallstep.com --fingerprint myfingerprint
$ step context list
$ echo $?
0
Additional Context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
Activity
jdoss commentedon Mar 12, 2023
I guess one can use
step context currentto test if theSTEPPATHis using a context but I think should we add the same behavior tostep context list13 remaining items