Skip to content
This repository has been archived by the owner on Jan 4, 2021. It is now read-only.

Commit

Permalink
Merge pull request #604 from ripienaar/592
Browse files Browse the repository at this point in the history
(#592) support both names for the execution wrapper
  • Loading branch information
ripienaar committed Nov 11, 2019
2 parents 9185b11 + 3cc8a9c commit 5496388
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/mcollective/util/tasks_support.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,15 @@ def aio_bin_path
# @return [String]
def aio_wrapper_path
if Util.windows?
File.join(aio_bin_path, "task_wrapper.exe")
legacy = File.join(aio_bin_path, "task_wrapper.exe")
return legacy if File.exist?(legacy)

File.join(aio_bin_path, "execution_wrapper.exe")
else
File.join(aio_bin_path, "task_wrapper")
legacy = File.join(aio_bin_path, "task_wrapper")
return legacy if File.exist?(legacy)

File.join(aio_bin_path, "execution_wrapper")
end
end

Expand Down
1 change: 1 addition & 0 deletions spec/unit/mcollective/util/tasks_support_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ module Util

describe "#run_task_command" do
it "should spawn the right command and wait" do
File.stubs(:exist?).with("/opt/puppetlabs/puppet/bin/task_wrapper").returns(true)
File.stubs(:exist?).with(ts.wrapper_path).returns(true)
ts.stubs(:request_spooldir).returns(File.join(cache, "test_1"))
ts.expects(:spawn_command).with(
Expand Down

0 comments on commit 5496388

Please sign in to comment.