lib/rconf/support/environment_updater.rb in rconf-0.7.10 vs lib/rconf/support/environment_updater.rb in rconf-0.7.11

- old
+ new

@@ -26,10 +26,14 @@ # # === Return # true:: If bash resource or profile file was updated # false:: Otherwise def self.update(code, dependencies=[]) - candidates = ['.bashrc', '.bash_profile'] + if Platform.darwin? + candidates = [ '.bash_profile' ] + else + candidates = ['.bash_profile', '.bashrc'] + end candidates.map! { |c| File.join(ENV['HOME'], c) } bashrc_path = candidates.detect { |c| File.exist?(c) } updated = false if bashrc_path content = IO.read(bashrc_path)