substituited all -e key=value to -e key

This commit is contained in:
Nikola Jokic
2022-06-08 15:02:40 +02:00
parent ecb9376000
commit 150bc0503a

View File

@@ -43,13 +43,9 @@ export async function createContainer(
}
if (args.environmentVariables) {
for (const [key, value] of Object.entries(args.environmentVariables)) {
for (const [key] of Object.entries(args.environmentVariables)) {
dockerArgs.push('-e')
if (!value) {
dockerArgs.push(`"${key}"`)
} else {
dockerArgs.push(`"${key}=${value}"`)
}
dockerArgs.push(`"${key}"`)
}
}
@@ -319,13 +315,9 @@ export async function containerExecStep(
): Promise<void> {
const dockerArgs: string[] = ['exec', '-i']
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')
if (!value) {
dockerArgs.push(`"${key}"`)
} else {
dockerArgs.push(`"${key}=${value}"`)
}
dockerArgs.push(`"${key}"`)
}
// Todo figure out prepend path and update it here