'sf org login sfdx-url --sfdx-url-stdin` fails if an extra flag is given #2811
Labels
investigating
We're actively investigating this issue
validated
Version information for this issue has been validated
Summary
sf org login sfdx-url --sfdx-url-stdin
requires either no input or-
. However, when no input is given, and a second flag is used, then the cli is reading the second flag as the input for--sfdx-url-stdin
, resulting in an error message. This appears to be an issue with oclif.I've created a PR to fix this, linked below.
Also, there is a small issue with documentation that I've listed at the bottom.
Steps To Reproduce
Happy path:
$ echo {SFDX AUTH URL} | sf org login sfdx-url --set-default --sfdx-url-stdin
This results in successful authentication. Note that
--sfdx-url-stdin
is given as the last flag.Bad path:
$ echo {SFDX AUTH URL} | sf org login sfdx-url --sfdx-url-stdin --set-default
This results in the following error:
Error (1): Flag --sfdx-url-stdin can only be read from stdin. The value must be "-" or not provided at all.
Note that
--sfdx-url-stdin
is given before--set-default
.Expected result
The command should succeed regardless of the order that the flags are given.
Actual result
The command fails unless
--sfdx-url-stdin
is given last in a sequence of flags.System Information
shell: zsh
Additional information
There is also a small issue with documentation for this flag. This is how it appears in the developer docs:
Formatting seems a little weird since usually you would expect all examples to be prefixed with
sf
, but this one usesecho
first.The text was updated successfully, but these errors were encountered: