Compare commits
1
Commits
86aa0b7539
..
v1.0.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e482810328 |
@@ -26,6 +26,7 @@ export function buildInvocation(
|
||||
const argv = [...script.args];
|
||||
const env: Record<string, string> = {};
|
||||
const redactedArgv = [...script.args];
|
||||
const redactedEnvAssignments: string[] = [];
|
||||
const redactedVariables: Record<string, unknown> = {};
|
||||
|
||||
for (const variable of script.variables) {
|
||||
@@ -55,6 +56,9 @@ export function buildInvocation(
|
||||
case "env": {
|
||||
const value = stringifyValue(raw, variable.joinWith);
|
||||
env[variable.envName!] = value;
|
||||
redactedEnvAssignments.push(
|
||||
`${variable.envName}=${variable.secret ? REDACTED : value}`,
|
||||
);
|
||||
break;
|
||||
}
|
||||
case "stdin": {
|
||||
@@ -74,7 +78,11 @@ export function buildInvocation(
|
||||
)
|
||||
: undefined;
|
||||
|
||||
const redactedCommandLine = [script.command, ...redactedArgv].join(" ");
|
||||
const redactedCommandLine = [
|
||||
...redactedEnvAssignments,
|
||||
script.command,
|
||||
...redactedArgv,
|
||||
].join(" ");
|
||||
|
||||
return { argv, env, stdin, redactedVariables, redactedCommandLine };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user