Skip to content

Commit

Permalink
Merge pull request #55 from troyready/set_env_vars_during_tf_shell
Browse files Browse the repository at this point in the history
ensure block env vars are included when launching tf-shell
  • Loading branch information
troyready authored Jun 6, 2023
2 parents 0157f54 + 9980938 commit 35099d9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- tf-shell: general environment variables weren't included in subshell

## [0.10.1] - 2023-05-07
### Fixed
Expand Down
5 changes: 5 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ class IHLP {
process.chdir(block.path);
const tfSetupRes = await runner.tfSetup();
const tfShellEnvVars = runner.addTfVarsToEnv(block.options.variables);
if (block.envVars) {
for (const key of Object.keys(block.envVars)) {
tfShellEnvVars[key] = block.envVars[key];
}
}
if (tfSetupRes.tfVersionDir) {
tfShellEnvVars.PATH =
tfSetupRes.tfVersionDir + ":" + tfShellEnvVars.PATH;
Expand Down

0 comments on commit 35099d9

Please sign in to comment.