Refactor Nomad Command Generation.
- Abstracting from the exec form while generating. - Removal of single quotes (usage of only double-quotes). - Bash-nesting using escaping of special characters.
This commit is contained in:

committed by
Sebastian Serth

parent
f309d0f70e
commit
7dadc5dfe9
@ -98,10 +98,11 @@ func (w *AWSFunctionWorkload) ExecuteInteractively(
|
||||
hideEnvironmentVariables(request, "AWS")
|
||||
request.PrivilegedExecution = true // AWS does not support multiple users at this moment.
|
||||
command, ctx, cancel := prepareExecution(request, w.ctx)
|
||||
commands := []string{"/bin/bash", "-c", command}
|
||||
exitInternal := make(chan ExitInfo)
|
||||
exit := make(chan ExitInfo, 1)
|
||||
|
||||
go w.executeCommand(ctx, command, stdout, stderr, exitInternal)
|
||||
go w.executeCommand(ctx, commands, stdout, stderr, exitInternal)
|
||||
go w.handleRunnerTimeout(ctx, exitInternal, exit, id)
|
||||
|
||||
return exit, cancel, nil
|
||||
|
Reference in New Issue
Block a user