diff --git a/lib/aruba/processes/spawn_process.rb b/lib/aruba/processes/spawn_process.rb index 1ff04dc89..1e81b19f7 100644 --- a/lib/aruba/processes/spawn_process.rb +++ b/lib/aruba/processes/spawn_process.rb @@ -266,7 +266,12 @@ def command_string end def command_path - @command_path ||= (Aruba.platform.builtin_shell_commands.include?(command) ? command : Aruba.platform.which(command, environment['PATH'])) + @command_path ||= + if Aruba.platform.builtin_shell_commands.include? command + command + else + Aruba.platform.which command, environment['PATH'] + end end def wait_for_io(time_to_wait)