Escape backtick in writeEntryPointScript (#101)

This commit is contained in:
Nikola Jokic
2023-08-28 10:27:20 +02:00
committed by GitHub
parent 547ed30dc3
commit 5107bb1d41
2 changed files with 3 additions and 1 deletions

View File

@@ -473,6 +473,7 @@ async function getCurrentNodeName(): Promise<string> {
} }
return nodeName return nodeName
} }
export function namespace(): string { export function namespace(): string {
if (process.env['ACTIONS_RUNNER_KUBERNETES_NAMESPACE']) { if (process.env['ACTIONS_RUNNER_KUBERNETES_NAMESPACE']) {
return process.env['ACTIONS_RUNNER_KUBERNETES_NAMESPACE'] return process.env['ACTIONS_RUNNER_KUBERNETES_NAMESPACE']

View File

@@ -125,7 +125,8 @@ export function writeEntryPointScript(
`"${key}=${value `"${key}=${value
.replace(/\\/g, '\\\\') .replace(/\\/g, '\\\\')
.replace(/"/g, '\\"') .replace(/"/g, '\\"')
.replace(/\$/g, '\\$')}"` .replace(/\$/g, '\\$')
.replace(/`/g, '\\`')}"`
) )
} }
environmentPrefix = `env ${envBuffer.join(' ')} ` environmentPrefix = `env ${envBuffer.join(' ')} `