Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adding inheritance of environment variables to tasks and builds #4

Merged
merged 1 commit into from
Apr 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/commands/task/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function runScript(
// keep track of whether callback has been invoked to prevent multiple invocations
let invoked = false;

const cProcess = childProcess.fork(scriptPath, { env });
const cProcess = childProcess.fork(scriptPath, { env: { ...process.env, ...env } });

// listen for errors as they may prevent the exit event from firing
cProcess.on("error", function (err) {
Expand Down
4 changes: 2 additions & 2 deletions src/lib/deployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ export const storeCode = async ({
process.chdir(`contracts/${contract}`);

if (!noRebuild) {
execSync("cargo wasm", { stdio: "inherit" });
execSync("cargo run-script optimize", { stdio: "inherit" });
execSync("cargo wasm", { stdio: "inherit", env: process.env });
execSync("cargo run-script optimize", { stdio: "inherit", env: process.env });
}

const wasmByteCode = fs
Expand Down