mirror of
https://github.com/actions/runner-container-hooks.git
synced 2025-12-15 01:06:43 +00:00
substituited all -e key=value to -e key
This commit is contained in:
@@ -43,13 +43,9 @@ export async function createContainer(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (args.environmentVariables) {
|
if (args.environmentVariables) {
|
||||||
for (const [key, value] of Object.entries(args.environmentVariables)) {
|
for (const [key] of Object.entries(args.environmentVariables)) {
|
||||||
dockerArgs.push('-e')
|
dockerArgs.push('-e')
|
||||||
if (!value) {
|
dockerArgs.push(`"${key}"`)
|
||||||
dockerArgs.push(`"${key}"`)
|
|
||||||
} else {
|
|
||||||
dockerArgs.push(`"${key}=${value}"`)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -319,13 +315,9 @@ export async function containerExecStep(
|
|||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const dockerArgs: string[] = ['exec', '-i']
|
const dockerArgs: string[] = ['exec', '-i']
|
||||||
dockerArgs.push(`--workdir=${args.workingDirectory}`)
|
dockerArgs.push(`--workdir=${args.workingDirectory}`)
|
||||||
for (const [key, value] of Object.entries(args['environmentVariables'])) {
|
for (const [key] of Object.entries(args['environmentVariables'])) {
|
||||||
dockerArgs.push('-e')
|
dockerArgs.push('-e')
|
||||||
if (!value) {
|
dockerArgs.push(`"${key}"`)
|
||||||
dockerArgs.push(`"${key}"`)
|
|
||||||
} else {
|
|
||||||
dockerArgs.push(`"${key}=${value}"`)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Todo figure out prepend path and update it here
|
// Todo figure out prepend path and update it here
|
||||||
|
|||||||
Reference in New Issue
Block a user