I have a quick question about the
hab cli setup command, and expected behaviour. Basically what I did was I unset my HAB_* environment variables, and remove my
~/.hab/etc/cli.toml file (all of this is being run on Linux, but same behaviour is seen on Mac OSX), and then re-ran
hab cli setup command, which re-created my
~/.hab/etc/cli.toml with values I expect. Note that I also tested this with latest hab version, 0.68.0.
kmott@kmott-sabayon ~ $ unset HAB_BLDR_URL HAB_AUTH_TOKEN HAB_ORIGIN kmott@kmott-sabayon ~ $ rm ~/.hab/etc/cli.toml kmott@kmott-sabayon ~ $ hab cli setup [ ... input cli parameters ... ] kmott@kmott-sabayon ~ $ cat ~/.hab/etc/cli.toml auth_token = "<my_token_value>" origin = "kmott" bldr_url = "https://bldr.mycompany.com"
Next, I entered the studio, and noticed that a bunch of the HAB_* envronment variables were not set to expected values, even though
cli.toml has correct values.
kmott@kmott-sabayon ~ $ hab studio enter -D [default:/src:0]# echo $HAB_BLDR_URL [default:/src:0]# echo $HAB_AUTH_TOKEN [default:/src:0]# echo $HAB_ORIGIN kmott
Interestingly, the only
cli.toml value that “stuck” was
HAB_ORIGIN (which may have been defaulted to just my
$USER var anyways). I can easily workaround it by setting
HAB_* shell variables before doing
hab studio enter -D, but the studio behaviour of not picking up the
cli.toml vars seems inconsistent.
Is this expected behaviour of the
hab studio enter -D vs
hab cli setup interaction?
HAB_* variables be set in the studio from values in