Author: vborja
Date: Fri Mar 7 10:06:08 2008
New Revision: 634767
URL: http://svn.apache.org/viewvc?rev=634767&view=rev
Log:
BUILDR-54. Fixed pattern for detecting Windows host_os. Thanks to Nick Seiger.
Modified:
incubator/buildr/trunk/lib/core/common.rb
Modified: incubator/buildr/trunk/lib/core/common.rb
URL:
http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/core/common.rb?rev=634767&r1=634766&r2=634767&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/core/common.rb (original)
+++ incubator/buildr/trunk/lib/core/common.rb Fri Mar 7 10:06:08 2008
@@ -28,7 +28,7 @@
# capitalizes the drive name and ensures backslashes are used
def normalize_path(path, *dirs)
path = File.expand_path(path, *dirs)
- if Config::CONFIG["host_os"] =~ /win/i
+ if Config::CONFIG["host_os"] =~ /mswin|windows|cygwin/i
path.gsub!('/', '\\').gsub!(/^[a-zA-Z]+:/) { |s| s.upcase }
else
path