Closed janicedatawire closed 8 years ago
This is indeed as designed – suppose you do the following:
dwc logout dwc status
There you haven't specified --state
at all, but the situation is exactly the same: you're trying to run status
with a nonexistent state file, and the most sane thing is to report that you're not logged in.
Basically, --state
is an option whose presence implies that you have a clue. Differentiating between "you're not logged in" and "you have a clue but you happen to have typo'd the path to the state file while running a command that's meant to be reading but not creating the state file"... innh. :)
That being said, reopen if you feel really strongly about this one.
I created an org with a custom state file as follows:
If I specify a non-existent file location for --state in subsequent calls, I get a user not logged in error as follows:
This may be as intended and after thinking about it for a second I can see why this error makes sense from a technical standpoint, but when possible I am in favor of error messages that tell users how to fix the problem and this one does not. It would be nice to indicate that the user supplied an invalid state file so they can try again with the correct value.