From b080a17f9cfe07abb4f80eca898d5a74e50f9134 Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Tue, 30 Jul 2019 16:03:26 -0700 Subject: 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 --- lib/mixlib/shellout/windows.rb | 2 +- lib/mixlib/shellout/windows/core_ext.rb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'lib') 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 -- cgit v1.2.1