Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix Unguarded actions library use code scanning error
Must access the env var directly in order to avoid recursive calls to 
`getRequiredEnvParam`.
Andrew Eisenberg committed Jun 2, 2021

Unverified

No user is associated with the committer email.
1 parent 082575f commit cc0733f
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion lib/util.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/util.js.map
5 changes: 4 additions & 1 deletion src/util.ts
@@ -466,7 +466,10 @@ export function getRequiredEnvParam(paramName: string): string {
if (value === undefined || value.length === 0) {
throw new Error(`${paramName} environment variable must be set`);
}
core.debug(`${paramName}=${value}`);

if (process.env[EnvVar.RUN_MODE] === Mode.actions) {
core.debug(`${paramName}=${value}`);
}
return value;
}

0 comments on commit cc0733f

Please sign in to comment.