Exatract method "_path_separator" to handle JRuby too
where the Config::CONFIG hash seem to be buggy.
This commit is contained in:
parent
a3bd727568
commit
5f1be57ebc
@ -182,8 +182,12 @@ module Cmdtest
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def _path_separator
|
||||||
|
Config::CONFIG["PATH_SEPARATOR"] || ":"
|
||||||
|
end
|
||||||
|
|
||||||
def prepend_path_dirs(full_path_dirs)
|
def prepend_path_dirs(full_path_dirs)
|
||||||
new_env_path = (full_path_dirs + [@orig_envpath]).join(Config::CONFIG["PATH_SEPARATOR"])
|
new_env_path = (full_path_dirs + [@orig_envpath]).join(_path_separator)
|
||||||
if new_env_path != ENV["PATH"]
|
if new_env_path != ENV["PATH"]
|
||||||
ENV["PATH"] = new_env_path
|
ENV["PATH"] = new_env_path
|
||||||
end
|
end
|
||||||
@ -191,7 +195,7 @@ module Cmdtest
|
|||||||
|
|
||||||
def run
|
def run
|
||||||
@orig_cwd = Dir.pwd
|
@orig_cwd = Dir.pwd
|
||||||
ENV["PATH"] = Dir.pwd + Config::CONFIG["PATH_SEPARATOR"] + ENV["PATH"]
|
ENV["PATH"] = Dir.pwd + _path_separator + ENV["PATH"]
|
||||||
@orig_envpath = ENV["PATH"]
|
@orig_envpath = ENV["PATH"]
|
||||||
@n_assert_failures = 0
|
@n_assert_failures = 0
|
||||||
@n_assert_errors = 0
|
@n_assert_errors = 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user