From f752196117ab3b125b5897d25ff3df8a0224ff93 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Thu, 14 Apr 2022 12:57:43 +0200 Subject: [PATCH] use DAGGER_LOG_FORMAT env instead of --log-format flag Signed-off-by: CrazyMax --- dist/index.js | 6 +++++- src/main.ts | 8 +++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 9d81b88..4510952 100644 --- a/dist/index.js +++ b/dist/index.js @@ -234,7 +234,11 @@ function run() { } for (const cmd of inputs.cmds) { yield core.group(cmd, () => __awaiter(this, void 0, void 0, function* () { - yield exec.exec(`${daggerBin} ${cmd} --log-format plain`); + yield exec.exec(`${daggerBin} ${cmd}`, undefined, { + env: Object.assign({}, process.env, { + DAGGER_LOG_FORMAT: 'plain' + }) + }); })); } } diff --git a/src/main.ts b/src/main.ts index f36d1b0..e8510a8 100644 --- a/src/main.ts +++ b/src/main.ts @@ -34,7 +34,13 @@ async function run(): Promise { for (const cmd of inputs.cmds) { await core.group(cmd, async () => { - await exec.exec(`${daggerBin} ${cmd} --log-format plain`); + await exec.exec(`${daggerBin} ${cmd}`, undefined, { + env: Object.assign({}, process.env, { + DAGGER_LOG_FORMAT: 'plain' + }) as { + [key: string]: string; + } + }); }); } } catch (error) {