summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRyan Davis <ryand-ruby@zenspider.com>2019-07-30 16:03:26 -0700
committerRyan Davis <ryand-ruby@zenspider.com>2019-07-30 16:03:26 -0700
commitb080a17f9cfe07abb4f80eca898d5a74e50f9134 (patch)
treeb7f743d1f347a2c2feb0608b014d613eafda4233 /lib
parent9b16d5300021893ad5c3a02f1a9f4f17884bcc2d (diff)
downloadmixlib-shellout-b080a17f9cfe07abb4f80eca898d5a74e50f9134.tar.gz
Fix return type of Process.create to be a ProcessInfo instance again.
This fixes compatibility with win32-process' Process.create while maintaining the rest of our changes. This moves Process.create to Process.create3. Process.create now calls create3 and returns the ProcessInfo. The break came from PR #177, which is fairly extensive, so I'm only rolling out the return type change on this method. Signed-off-by: Ryan Davis <zenspider@chef.io>
Diffstat (limited to 'lib')
-rw-r--r--lib/mixlib/shellout/windows.rb2
-rw-r--r--lib/mixlib/shellout/windows/core_ext.rb4
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/mixlib/shellout/windows.rb b/lib/mixlib/shellout/windows.rb
index 26130d3..09c97c5 100644
--- a/lib/mixlib/shellout/windows.rb
+++ b/lib/mixlib/shellout/windows.rb
@@ -88,7 +88,7 @@ module Mixlib
#
# Start the process
#
- process, profile, token = Process.create(create_process_args)
+ process, profile, token = Process.create3(create_process_args)
logger.debug(format_process(process, app_name, command_line, timeout)) if logger
begin
# Start pushing data into input
diff --git a/lib/mixlib/shellout/windows/core_ext.rb b/lib/mixlib/shellout/windows/core_ext.rb
index 83a31ab..621efb9 100644
--- a/lib/mixlib/shellout/windows/core_ext.rb
+++ b/lib/mixlib/shellout/windows/core_ext.rb
@@ -109,6 +109,10 @@ module Process
class << self
def create(args)
+ create3(args).first
+ end
+
+ def create3(args)
unless args.is_a?(Hash)
raise TypeError, "hash keyword arguments expected"
end