indigo-dc / oidc-agent

oidc-agent for managing OpenID Connect tokens on the command line
MIT License
115 stars 30 forks source link

oidc-agent-service fails in default configuration with 5.2.0 #593

Closed olifre closed 3 months ago

olifre commented 3 months ago

Starting with 5.2.0, the default option file contains:

OIDC_AGENT_OPTS="--restart-on-update ${OIDC_AGENT_OPTS}"

Running oidc-agent-service start-from-x reveals:

$ oidc-agent-service start-from-x
/usr/bin/oidc-agent: unrecognized option '--restart-on-update '
Try `oidc-agent --help' or `oidc-agent --usage' for more information.

The reason seems to be that the list of arguments is force-converted into a single string in oidc-agent-service: https://github.com/indigo-dc/oidc-agent/blob/83bac9feef8b69c35b96eebea88099053fa7f64d/src/oidc-agent-service/oidc-agent-service#L37 Removing the quotes there would fix the issue (they were added in https://github.com/indigo-dc/oidc-agent/commit/392a8e4b0333856ea9d7339c8c7eccbc9b880e60 ), or alternatively an option array could be used instead.