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

Cake.CoreCLR can't handle whitespace in path #2214

Closed
bjorkstromm opened this issue Jul 19, 2018 · 5 comments
Closed

Cake.CoreCLR can't handle whitespace in path #2214

bjorkstromm opened this issue Jul 19, 2018 · 5 comments
Labels
Milestone

Comments

@bjorkstromm
Copy link
Member

Steps to reproduce:

C:\temp> mkdir "some path"
C:\temp> cd '.\some path\'
C:\temp\some path> nuget install Cake.CoreCLR -o tools
C:\temp\some path> echo 'Information("Hello World");' > build.cake
C:\temp\some path> dotnet .\tools\Cake.CoreCLR.0.29.0\Cake.dll
Error: Could not find a part of the path 'C:\temp\some path\path\tools\Cake.CoreCLR.0.29.0'.

Notice how the path is duplicated in the above path.

//cc @gep13

@bjorkstromm
Copy link
Member Author

Fun fact, if you have more than one whitespace in your path, you'll get another error message.

C:\temp\some other path> dotnet .\tools\Cake.CoreCLR.0.29.0\Cake.dll
More than one build script specified.
For usage, use parameter --help

@bjorkstromm bjorkstromm added this to the v0.30.0 milestone Jul 19, 2018
@bjorkstromm bjorkstromm changed the title Cake.CoreCLR can't handle white space in path Cake.CoreCLR can't handle whitespace in path Jul 19, 2018
@bjorkstromm
Copy link
Member Author

I believe issue is this

return string.Join(" ", Environment.GetCommandLineArgs());

@jnm2
Copy link
Contributor

jnm2 commented Jul 20, 2018

Related to #1272, which I can't seem to find the time for. 😢

@gep13
Copy link
Member

gep13 commented Aug 16, 2018

@mholo65 did you have a plan for how this one can get fixed?

@bjorkstromm
Copy link
Member Author

@gep13, no more than a ugly quick hack 😄 But might be good enough for 0.30.0

bjorkstromm added a commit to bjorkstromm/cake that referenced this issue Aug 20, 2018
devlead added a commit that referenced this issue Aug 21, 2018
* mholo65-feature/GH-2214:
  (GH-2214) Use Environment.CommandLine directly and remove polyfill.
devlead added a commit that referenced this issue Aug 22, 2018
* release/0.30.0: (22 commits)
  (build) Updated version and release notes.
  (GH-2214) Use Environment.CommandLine directly and remove polyfill.
  (GH-2238) Add repository metadata to NuGet packages
  Added alias for checking if the current run is a dry run.
  Execute setup and teardown when dry running script.
  (GH-2233) Documented bootstrap argument
  (GH-2232) Document exclusive argument
  (GH-2234) Removed Mono from CakeOption
  Add XML comments for CakeTaskExtensions
  Fix CakeTaskExtensions accessibility
  (build) Change tool name & fix packaging
  (build) Added Cake.Tool package to parameters.cake
  Allow opting out from using working directory.
  (GH-2067) Cake .NET Core Tool package * Updates SDK * Addes Cake.Tool project * Fixes #2067 * Fixes #1644
  Support for DotCover configuration file added - fixes #1401
  Initialized all tool settings collection properties
  Failing tests for initialized tool settings collections
  (GH-2207) Update to NuGet 4.7.0
  (GH-2220) Corrected documentation for InnoSetup alias
  (doc) Minor modification
  ...
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

3 participants