cake-build/cake

Working directory with a space

Open

#1,898 创建于 2017年10月26日

在 GitHub 查看
 (8 评论) (0 反应) (0 负责人)C# (3,742 star) (738 fork)batch import
BugHelp wantedUp-for-grabs

描述

What You Are Seeing? When trying to debug a cake script in vs code I am seeing the "More than one build script specified" error. I think it has something to do with my working directory having a space in a folder name as when I run without a build script specified I get an IO error and it seems to be combining my working path with the path after the space (see repro steps).

What is Expected? I am expecting to be able to debug my cake script.

What version of Cake are you using? 0.23.0

Are you running on a 32 or 64 bit system? 64

What environment are you running on? Windows? Linux? Mac? Windows 7

How Did You Get This To Happen? (Steps to Reproduce)

Clone the example repo https://github.com/mholo65/cake-vscode-debug-example into a foder path with a space in the first folder i.e "c:\spaced folder\cakedebug" and then hit F5 on vs code or, use PS:

  1. cd "c:\spaced folder\cakedebug"
  2. ./build.ps1
  3. Observe error "More than one build script specified"

At this point you can take the space out of the base folder and rerun build.ps1, watch the build script run.

After this put the space back in the folder name and:

  1. cd "c:\spaced folder\cakedebug"
  2. dotnet tools/Cake.CoreCLR/Cake.dll --verbosity=diagnostic
  3. Observe error: Module directory does not exist. Error: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\spaced folder\cakedebug\folder\cakedebug\tools\Cake.CoreCLR'. at System.IO.Win32FileSystem.SetCurrentDirectory(String fullPath) at System.IO.Directory.SetCurrentDirectory(String path) at Cake.Core.Scripting.ScriptRunner.Run(IScriptHost host, FilePath scriptPath, IDictionary`2 arguments) at Cake.Commands.BuildCommand.Execute(CakeOptions options) at Cake.CakeApplication.Run(CakeOptions options) at Cake.Program.Main()

贡献者指南