Skip to content

Commit

Permalink
Remove quote of args
Browse files Browse the repository at this point in the history
  • Loading branch information
APErebus committed Dec 4, 2023
1 parent 60be632 commit 264f5b8
Showing 1 changed file with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,6 @@ await jobService.Watch(scriptTicket, job =>
return resultStatusCode;
}



async Task CreateJob(IScriptLogWriter writer, CancellationToken cancellationToken)
{
//write the bootstrap runner script to the workspace
Expand Down Expand Up @@ -214,15 +212,12 @@ async Task CreateJob(IScriptLogWriter writer, CancellationToken cancellationToke
Image = await containerResolver.GetContainerImageForCluster(),
Command = new List<string> { "bash" },
Args = new List<string>
{
$"/octopus/Work/{scriptTicket.TaskId}/bootstrapRunner.sh",
$"/octopus/Work/{scriptTicket.TaskId}",
$"/octopus/Work/{scriptTicket.TaskId}/{scriptName}"
}.Concat((workspace.ScriptArguments ?? Array.Empty<string>())
.SelectMany(arg => new[]
{
$"'{arg}'"
})).ToList(),
$"/octopus/Work/{scriptTicket.TaskId}/bootstrapRunner.sh",
$"/octopus/Work/{scriptTicket.TaskId}",
$"/octopus/Work/{scriptTicket.TaskId}/{scriptName}"
}.Concat(workspace.ScriptArguments ?? Array.Empty<string>())
.ToList(),
VolumeMounts = new List<V1VolumeMount>
{
new("/octopus", "tentacle-home"),
Expand Down Expand Up @@ -253,7 +248,6 @@ async Task CreateJob(IScriptLogWriter writer, CancellationToken cancellationToke
await jobService.CreateJob(job, cancellationToken);
}


void RecordScriptHasStarted(IScriptLogWriter writer)
{
try
Expand Down

0 comments on commit 264f5b8

Please sign in to comment.