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

Custom command line switches can't contain spaces in value #671

Closed
Sam13 opened this issue Feb 3, 2016 · 6 comments
Closed

Custom command line switches can't contain spaces in value #671

Sam13 opened this issue Feb 3, 2016 · 6 comments
Assignees
Labels
Milestone

Comments

@Sam13
Copy link
Contributor

Sam13 commented Feb 3, 2016

Is it intended that custom command line switches which values contain spaces need to be escaped like that?

Cake.exe build.cake "-target=Te st"

If I specify like the following, Cake reports that more than one build script is specified:

Cake.exe build.cake -target="Te st"

Output:

More than one build script specified.

Could not find a build script to execute.
Either the first argument must the build script's path,
or build script should follow default script name conventions.

Usage: Cake.exe [build-script] [-verbosity=value]
                [-showdescription] [-dryrun] [..]

I use Cake 0.8.0

@patriksvensson patriksvensson added this to the v0.9.0 milestone Feb 3, 2016
@patriksvensson
Copy link
Member

@Sam13 No, your assumptions are correct. -target="te st" should be valid. I suspect that there's a bug in the argument tokenizer.

@gep13 gep13 modified the milestones: v0.9.0, v0.10.0 Feb 22, 2016
@gep13 gep13 modified the milestones: v0.10.0, v0.12.0 Mar 9, 2016
@patriksvensson patriksvensson modified the milestones: v0.13.0, v0.12.0 May 11, 2016
@FoCoPeazy
Copy link

@patriksvensson Any word on this? As of v0.11 I'm still experiencing this bug. I'm trying to pass the path of a file, and this path contains spaces. When the path contains spaces, I receive the error "More than one build script specified." If I modify the file path to not contain spaces, then everything works as expected. This is a rather annoying bug to work around in terms of our build server.

@patriksvensson
Copy link
Member

patriksvensson commented May 12, 2016

@FoCoPeazy Unless someone step up and does this before us, we're planning on fixing this in the 0.13.0 release.

@FoCoPeazy
Copy link

@patriksvensson Thanks for the update! I may take a look into it, although I'm not at all familiar with the Cake codebase...

Also, just want to say that Cake is fantastic overall, keep up the great work :)

@patriksvensson
Copy link
Member

@Sam13 @FoCoPeazy A fix for this has been implemented in #955. Should appear in version 0.13.0 of Cake.

@Sam13
Copy link
Contributor Author

Sam13 commented Jun 6, 2016

Thanks 👍

@gep13 gep13 closed this as completed in #955 Jun 6, 2016
@patriksvensson patriksvensson changed the title Custom command line switches containing spaces in value Custom command line switches can't contain spaces in value Jun 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants