lib/user.rb in sprout-0.5.25 vs lib/user.rb in sprout-0.5.29
- old
+ new
@@ -118,11 +118,11 @@
end
def get_exe_path(executable)
paths = get_paths
paths.each do |path|
- if(File.exists?(File.join(path, executable)))
+ if(File.exists?(File.join(path, executable)))
return File.join(path, executable)
end
end
return nil
end
@@ -156,11 +156,11 @@
def execute(tool, options='')
tool = Sprout.load(tool)
if(tool.executable)
target = get_exe_path(tool.executable)
else
- target = tool.archive_path
+ target = tool.archive_path
end
Log.puts(">> Execute: #{File.basename(target)} #{options}")
runner = get_process_runner("#{clean_path(target)} #{options}")
result = runner.read
error = runner.read_err
@@ -244,11 +244,11 @@
return super
end
end
def clean_path(path)
- path = path.split('/').join(File::SEPARATOR)
+ path = path.split('/').join("\\")
if(path.index(' '))
return %{"#{path}"}
end
return path
end
@@ -287,10 +287,10 @@
path = path.split(":").join("")
parts = path.split("/")
path = parts.shift().downcase + "/" + parts.join("/")
@home = "/cygdrive/" + path
end
- return @home
+ return @home
end
end
class VistaUser < WinUser