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
$ registry --config /tmp/apiz config list
registry.address = apiz.timbx.me:443
registry.insecure = false
registry.project = catalog
token-source = echo "ok"
Your active configuration is: "/tmp/apiz".
But this doesn't:
$ registry --config /tmp/apiz get projects
Usage:
...
Error: open /home/tim/.config/registry/apiz: no such file or directory
Run 'registry --help' for usage.
I can't explain why one of these commands should be getting its configuration differently from the other, but I observe that registry config list calls config.ActiveRaw()here and registry get projects calls connection.ActiveConfig()here.
Looking further, I see that config.ActiveRaw() is only used by the registry config subcommands and registry auth print-token, and all the others use connection.ActiveConfig().
@theganyo do you know why we have two ways of doing this? Is there something to watch out for in merging them?
The text was updated successfully, but these errors were encountered:
IIRC, ActiveRaw() returns exactly the contents of the config whereas ActiveConfig() returns a resolved set of vars that can include params and env var overrides.
Another suspicious thing that I see is that connection.ActiveConfig() just directly reads the configuration instead of using config.ActiveRaw() or config.Active() (I think this is what it should be calling).
Unfortunately #1230 didn't fully fix #1228.
This now works:
But this doesn't:
I can't explain why one of these commands should be getting its configuration differently from the other, but I observe that
registry config list
callsconfig.ActiveRaw()
here andregistry get projects
callsconnection.ActiveConfig()
here.Looking further, I see that
config.ActiveRaw()
is only used by theregistry config
subcommands andregistry auth print-token
, and all the others useconnection.ActiveConfig()
.@theganyo do you know why we have two ways of doing this? Is there something to watch out for in merging them?
The text was updated successfully, but these errors were encountered: