lib/rbbt/resource/util.rb in rbbt-util-5.31.7 vs lib/rbbt/resource/util.rb in rbbt-util-5.31.8

- old
+ new

@@ -31,12 +31,12 @@ end end module Resource def set_software_env(software_dir) - software_dir.opt.find_all.reverse.each do |software_dir| + software_dir.opt.find_all.collect{|d| File.dirname(d)}.reverse.each do |software_dir| next unless software_dir.exists? - software_dir = File.expand_path(File.dirname(software_dir)) + software_dir = File.expand_path(software_dir) opt_dir = File.join(software_dir, 'opt') bin_dir = File.join(opt_dir, 'bin') Misc.env_add 'PATH', bin_dir