Skip to content

Commit

Permalink
fix: missing env args for script execution
Browse files Browse the repository at this point in the history
  • Loading branch information
jayzhang committed Feb 17, 2025
1 parent 53bfe06 commit 4bdc5f4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/fx-core/src/component/driver/script/scriptDriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,14 @@ export async function executeCommand(
redirectTo?: string
): Promise<Result<[string, DotenvOutput], FxError>> {
const workingDir = pathUtils.resolveFilePath(projectPath, workingDirectory);
env = env || {};
if (ui?.runCommand) {
const res = await ui.runCommand({
cmd: command,
workingDirectory: workingDir,
timeout: timeout,
shell: shell,
env: { ...process.env, ...env } as { [k: string]: string },
});
if (res.isErr()) {
return err(res.error);
Expand Down

0 comments on commit 4bdc5f4

Please sign in to comment.