diff options
author | Louise Crow <louise.crow@gmail.com> | 2012-10-01 11:03:52 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2012-10-01 11:03:52 +0100 |
commit | be96333dafd0fa0623ca4495237c8c6fa5457c14 (patch) | |
tree | 6a0dbc34767db4a49ea9231738fe17dd1df6934a /lib/alaveteli_external_command.rb | |
parent | 3cfa6c4d1c4ae6ba5e3f22ff8757d1ec9dcd8b68 (diff) | |
parent | 6ee1e8d0a4a8cfe02797c1a853bf27af2610ad27 (diff) |
Merge remote-tracking branch 'openaustralia_github/configuration_refactor' into develop
Conflicts:
config/general.yml-example
Diffstat (limited to 'lib/alaveteli_external_command.rb')
-rw-r--r-- | lib/alaveteli_external_command.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/alaveteli_external_command.rb b/lib/alaveteli_external_command.rb index 7d32be904..3bfc34e3a 100644 --- a/lib/alaveteli_external_command.rb +++ b/lib/alaveteli_external_command.rb @@ -14,16 +14,15 @@ module AlaveteliExternalCommand if program_name =~ %r(^/) program_path = program_name else - utility_search_path = MySociety::Config.get("UTILITY_SEARCH_PATH", ["/usr/bin", "/usr/local/bin"]) found = false - utility_search_path.each do |d| + Configuration::utility_search_path.each do |d| program_path = File.join(d, program_name) if File.file? program_path and File.executable? program_path found = true break end end - raise "Could not find #{program_name} in any of #{utility_search_path.join(', ')}" if !found + raise "Could not find #{program_name} in any of #{Configuration::utility_search_path.join(', ')}" if !found end xc = ExternalCommand.new(program_path, *args) |