diff --git a/vendor/gems/message_bus/lib/message_bus/diagnostics.rb b/vendor/gems/message_bus/lib/message_bus/diagnostics.rb index ed1a954df89..871755afbd6 100644 --- a/vendor/gems/message_bus/lib/message_bus/diagnostics.rb +++ b/vendor/gems/message_bus/lib/message_bus/diagnostics.rb @@ -1,8 +1,13 @@ class MessageBus::Diagnostics def self.full_process_path begin - info = `ps -eo "%p|$|%a" | grep '^\\s*#{Process.pid}'` - info.strip.split('|$|')[1] + system = `uname`.strip + if system == "Darwin" + `ps -o "comm=" -p #{Process.pid}` + else + info = `ps -eo "%p|$|%a" | grep '^\\s*#{Process.pid}'` + info.strip.split('|$|')[1] + end rescue # skip it ... not linux or something weird end