Disable verbose output accessing PATH
This commit is contained in:
parent
e8e38a4007
commit
328d1aa8af
|
@ -29,12 +29,18 @@ module Vagrant
|
||||||
exts = ENV['PATHEXT'].split(';')
|
exts = ENV['PATHEXT'].split(';')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
current_verbose = $VERBOSE
|
||||||
|
$VERBOSE = nil
|
||||||
|
begin
|
||||||
ENV['PATH'].encode('UTF-8', 'binary', invalid: :replace, undef: :replace, replace: '').split(File::PATH_SEPARATOR).each do |path|
|
ENV['PATH'].encode('UTF-8', 'binary', invalid: :replace, undef: :replace, replace: '').split(File::PATH_SEPARATOR).each do |path|
|
||||||
exts.each do |ext|
|
exts.each do |ext|
|
||||||
exe = "#{path}#{File::SEPARATOR}#{cmd}#{ext}"
|
exe = "#{path}#{File::SEPARATOR}#{cmd}#{ext}"
|
||||||
return exe if File.executable? exe
|
return exe if File.executable? exe
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
ensure
|
||||||
|
$VERBOSE = current_verbose
|
||||||
|
end
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue