cake-build/cake

Working directory with a space

開放

#1,898 建立於 2017年10月26日

 (8 則留言) (0 個反應) (0 位負責人)C# (738 個分叉)batch import
BugHelp wantedUp-for-grabs

倉庫指標

星標
 (3,742 顆星)
PR 合併指標
 (平均合併 1天 1小時) (30 天內合併 25 個 PR)

描述

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()

貢獻者指南