add an env var... Build env is broken on FC29 so moving to ubuntu vm for testing
@@ -14,6 +14,7 @@ use crate::{config,
pub const ARTIFACT_PATH_ENVVAR: &str = "ARTIFACT_PATH";
const ORIGIN_ENVVAR: &str = "HAB_ORIGIN";
+const AUTH_TOKEN_ENVVAR: &str = "HAB_AUTH_TOKEN"
const STUDIO_CMD: &str = "hab-studio";
const STUDIO_CMD_ENVVAR: &str = "HAB_STUDIO_BINARY";
const STUDIO_PACKAGE_IDENT: &str = "core/hab-studio";
@@ -26,6 +27,13 @@ pub fn start(ui: &mut UI, args: &[OsString]) -> Result<()> {
env::set_var("HAB_ORIGIN", default_origin);
}
}
+ if henv::var(AUTH_TOKEN_ENVVAR).is_err() {
+ let config = config::load()?;
+ if let Some(auth_token) = config.auth_token {
+ debug!("Setting default origin {} via CLI config", &auth_token);
+ env::set_var("HAB_AUTH_TOKEN", auth_token;
+ }
+ }
if henv::var(CACHE_KEY_PATH_ENV_VAR).is_err() {
let path = fs::cache_key_path(None::<&str>);
