Skip to content

Instantly share code, notes, and snippets.

@aloker
Created June 18, 2015 07:51
Show Gist options
  • Save aloker/4d53960d0dc9e038522e to your computer and use it in GitHub Desktop.
Save aloker/4d53960d0dc9e038522e to your computer and use it in GitHub Desktop.
A possible fix for Albacore #167
diff --git a/lib/albacore/cross_platform_cmd.rb b/lib/albacore/cross_platform_cmd.rb
index dd7f58c..acec3d0 100644
--- a/lib/albacore/cross_platform_cmd.rb
+++ b/lib/albacore/cross_platform_cmd.rb
@@ -191,8 +191,8 @@ module Albacore
cmd = ::Rake::Win32.windows? ? 'where' : 'which'
parameters = []
- parameters << Paths.normalise_slashes(file) if dir == '.'
- parameters << Paths.normalise_slashes("#{dir}:#{file}") unless dir == '.'
+ parameters << Paths.normalise_slashes("\"#{file}\"") if dir == '.'
+ parameters << Paths.normalise_slashes("\"#{dir}\":\"#{file}\"") unless dir == '.'
parameters << '2> nul' if ::Rake::Win32.windows?
cmd, parameters = Paths.normalise cmd, parameters
cmd = "#{cmd} #{parameters.join(' ')}"
@aloker
Copy link
Author

aloker commented Jun 18, 2015

A fix for Albacore/albacore#167

Adds quotes to the paths passed to where/which.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment