Skip to content

Commit

Permalink
twoliter make: take go modules from environment
Browse files Browse the repository at this point in the history
In #130 1410d5b we startred requiring GO_MODULES to come from the
environment when using twoliter make. This appeared to work because go
mod vendor had been cached when testing. But in fact, we were not taking
the environment variable at all! So this commit fixes it.
  • Loading branch information
webern committed Jan 10, 2024
1 parent 4479202 commit 3a46875
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion twoliter/src/cargo_make.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,15 @@ fn build_system_env_vars() -> Result<Vec<String>> {

/// A list of environment variables that don't conform to naming conventions but need to be passed
/// through to the `cargo make` invocation.
const ENV_VARS: [&str; 12] = [
const ENV_VARS: [&str; 13] = [
"ALLOW_MISSING_KEY",
"AMI_DATA_FILE_SUFFIX",
"CARGO_MAKE_CARGO_ARGS",
"CARGO_MAKE_CARGO_LIMIT_JOBS",
"CARGO_MAKE_DEFAULT_TESTSYS_KUBECONFIG_PATH",
"CARGO_MAKE_TESTSYS_ARGS",
"CARGO_MAKE_TESTSYS_KUBECONFIG_ARG",
"GO_MODULES",
"MARK_OVA_AS_TEMPLATE",
"RELEASE_START_TIME",
"SSM_DATA_FILE_SUFFIX",
Expand Down Expand Up @@ -214,6 +215,7 @@ fn test_is_build_system_env() {
assert!(is_build_system_env("TESTSYS_!"));
assert!(is_build_system_env("BOOT_CONFIG!"));
assert!(is_build_system_env("BOOT_CONFIG_INPUT"));
assert!(is_build_system_env("GO_MODULES"));
assert!(is_build_system_env("AWS_REGION"));
assert!(!is_build_system_env("PATH"));
assert!(!is_build_system_env("HOME"));
Expand Down

0 comments on commit 3a46875

Please sign in to comment.