Skip to content
This repository has been archived by the owner on Aug 8, 2019. It is now read-only.

Commit

Permalink
Merge pull request #83 from bwitt/space_exec_prefix
Browse files Browse the repository at this point in the history
ensure there is a space between exec_prefix and script_path
  • Loading branch information
bwitt committed May 3, 2017
2 parents d5a332f + 6c86d15 commit 49a96ba
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions code/queue.rb
Expand Up @@ -398,16 +398,11 @@ def run_queue_script!(msg)
$log.debug("set ENV, now executing #{script_path}")

# bash -lc will execute the command but first re-initializing like a new login (reading .bashrc, etc.)
exec_prefix = @config.exec_prefix || "bash -lc "
if exec_prefix.empty?
$log.debug("exec path: #{script_path}")
exec(script_path, "") if RUBY_VERSION < '2.0'
exec(script_path, "", :close_others => false)
else
$log.debug("exec path: #{exec_prefix + script_path}")
exec(exec_prefix + script_path) if RUBY_VERSION < '2.0'
exec(exec_prefix + script_path, :close_others => false)
end
exec_prefix = @config.exec_prefix || "bash -lc"
exec_path = "#{exec_prefix} #{script_path}".strip
$log.debug("exec path: #{exec_path}")
exec("#{exec_path}") if RUBY_VERSION < '2.0'
exec("#{exec_path}", :close_others => false)
rescue
$log.warn($!)
$log.warn($!.backtrace)
Expand Down

0 comments on commit 49a96ba

Please sign in to comment.