Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle windows paths in all usage of shellwords parsing #686

Merged
merged 5 commits into from
Mar 14, 2018

Conversation

lox
Copy link
Contributor

@lox lox commented Mar 14, 2018

This centralises our use of shellword parsing (e.g parsing something like C:\Windows\System32\CMD.exe /S /C "bash.exe ./upload.sh" into it's respective tokens).

It turns out the Windows is ok with paths with forward slashes, even for UNC paths, so this just rolls with that.

It also sneakily rolls back #683 in favour of just converting the path to the binary to one that uses backslashes.

@@ -79,9 +80,18 @@ func (r JobRunner) Create() (runner *JobRunner, err error) {
return nil, err
}

args, err := shell.Parse(r.AgentConfiguration.BootstrapScript)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This moved up here because I moved it out of process.Process so that the error can be handled better.

@lox lox merged commit fc0fb40 into master Mar 14, 2018
@keithduncan keithduncan deleted the handle-windows-paths-in-shellword-parse branch September 22, 2021 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants