From 943f02db1f14910a18156a52deb7197e49b52e9b Mon Sep 17 00:00:00 2001 From: Nikhil Bhoski <47204011+nbhoski@users.noreply.github.com> Date: Sat, 18 May 2024 00:52:37 +0530 Subject: [PATCH] Changed env variable setting --- src/index.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index fdc34ac..194010b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -22,7 +22,15 @@ async function run() { const startupOptions = core.getInput("startup-options").split(" "); const helperScript = await matlab.generateScript(workspaceDir, command); - const execOptions = {process.env,env:{"MW_MATLAB_BUILDTOOL_DEFAULT_PLUGINS_FCN_OVERRIDE":"ciplugins.github.getDefaultPlugins"}}; + const customEnv = { + ...process.env, + "MW_MATLAB_BUILDTOOL_DEFAULT_PLUGINS_FCN_OVERRIDE":"ciplugins.github.getDefaultPlugins", + }; + + const execOptions: exec.ExecOptions = { + env: customEnv, + }; + const execOptions = {process.env,env:{}}; await matlab.runCommand(helperScript, platform, architecture, (cmd,args)=>exec.exec(cmd,args,execOptions), startupOptions); }