From c9cab8620179e89c5f2fdc05aa290099f62d7752 Mon Sep 17 00:00:00 2001 From: Luke Tomlinson Date: Wed, 5 May 2021 16:58:35 -0400 Subject: [PATCH] Lint --- packages/exec/src/toolrunner.ts | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/packages/exec/src/toolrunner.ts b/packages/exec/src/toolrunner.ts index fb4acf5a..eb60d8d9 100644 --- a/packages/exec/src/toolrunner.ts +++ b/packages/exec/src/toolrunner.ts @@ -601,13 +601,17 @@ export function argStringToArray(argString: string): string[] { } // Strips INPUT_ environment variables to prevent them leaking to child processes -export function stripInputEnvironmentVariables(env: NodeJS.ProcessEnv): NodeJS.ProcessEnv { - return Object.entries(env).filter(([key, value]) => { - return !key.startsWith('INPUT_') - }).reduce((obj: NodeJS.ProcessEnv, [key, value]) => { - obj[key] = value - return obj - }, {}) +export function stripInputEnvironmentVariables( + env: NodeJS.ProcessEnv +): NodeJS.ProcessEnv { + return Object.entries(env) + .filter(([key]) => { + return !key.startsWith('INPUT_') + }) + .reduce((obj: NodeJS.ProcessEnv, [key, value]) => { + obj[key] = value + return obj + }, {}) } class ExecState extends events.EventEmitter {