summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2020-07-16 11:03:20 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2020-07-16 11:03:20 -0700
commit00e8b1616252a8aee6b8646551946aaa5845baa1 (patch)
tree6ec1e7520d9efee9713b411b50605ca019828388 /lib
parent1dea4d0cebda1b1ed7899b9cff1f0a3aa74ee09d (diff)
downloadmixlib-shellout-00e8b1616252a8aee6b8646551946aaa5845baa1.tar.gz
add a simple smoke testlcg/extract-mixlib-shellout
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/mixlib/shellout/helper.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/mixlib/shellout/helper.rb b/lib/mixlib/shellout/helper.rb
index 50ee702..c7091d4 100644
--- a/lib/mixlib/shellout/helper.rb
+++ b/lib/mixlib/shellout/helper.rb
@@ -16,6 +16,7 @@
# limitations under the License.
require_relative "../shellout"
+require "chef-utils"
require "chef-utils/dsl/path_sanity"
require "chef-utils/internal"
@@ -153,7 +154,7 @@ module Mixlib
end
def __shell_out_command(*args, **options)
- if __config.target_mode?
+ if __transport_connection
FakeShellOut.new(args, options, __transport_connection.run_command(args.join(" "))) # FIXME: train should accept run_command(*args)
else
cmd = if options.empty?