The oidc-token options -o, -e and -i return the access token itself, the expiry time and the issuer (respectively). If multiple of these options are present or if a single option has an argument then shell code is generated that assigns the value to a particular variable; for example,
There is consistent behaviour if multiple of -o, -e and -i are specified. This forces oidc-token to emit shell code, with the -o output going to stdout and -e and -i going to stderr:
The
oidc-token
options-o
,-e
and-i
return the access token itself, the expiry time and the issuer (respectively). If multiple of these options are present or if a single option has an argument then shell code is generated that assigns the value to a particular variable; for example,The problem comes with how
-e
and-i
handle shell printing.In the case of
-o
, both the regular output and the shell code are emitted on stdout:However, for
-e
and-i
, the normal (non-shell) output is emitted on stdout while the shell code is printed on stderr.Here is the
-e
output:Here is the same commands for
-i
:There is consistent behaviour if multiple of
-o
,-e
and-i
are specified. This forcesoidc-token
to emit shell code, with the-o
output going to stdout and-e
and-i
going to stderr:The command option
-c
(or--env
) is documented as equivalent to specifying-o
,-e
,-i
. This seems to be the case, as it shows the same behaviour:This use of stderr is not documented in the man pages.
Moreover, I can't imagine what benefit it brings. It looks (to me) like a bug.