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
mholo65 opened this Issue Jul 19, 2018 · 5 comments

Comments

Projects
None yet
3 participants
@mholo65
Member

mholo65 commented Jul 19, 2018

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

@mholo65

This comment has been minimized.

Member

mholo65 commented Jul 19, 2018

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

@mholo65 mholo65 added the Bug label Jul 19, 2018

@mholo65 mholo65 added this to the v0.30.0 milestone Jul 19, 2018

@mholo65 mholo65 changed the title from Cake.CoreCLR can't handle white space in path to Cake.CoreCLR can't handle whitespace in path Jul 19, 2018

@mholo65

This comment has been minimized.

Member

mholo65 commented Jul 19, 2018

I believe issue is this

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

@jnm2

This comment has been minimized.

Contributor

jnm2 commented Jul 20, 2018

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

@gep13

This comment has been minimized.

Member

gep13 commented Aug 16, 2018

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

@mholo65

This comment has been minimized.

Member

mholo65 commented Aug 18, 2018

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

mholo65 added a commit to mholo65/cake that referenced this issue Aug 20, 2018

devlead added a commit that referenced this issue Aug 21, 2018

Merge branch 'mholo65-feature/GH-2214' into develop
* mholo65-feature/GH-2214:
  (GH-2214) Use Environment.CommandLine directly and remove polyfill.

devlead added a commit that referenced this issue Aug 22, 2018

Merge branch 'release/0.30.0' into main
* 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