Skip to content

Commit b413d68

Browse files
committed
Fix system commands
1 parent 75585a9 commit b413d68

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/raven/context.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,11 @@ def runtime_context
3838
}
3939
end
4040

41-
def sys_command(linux_command, win_command = nil)
42-
`#{linux_command}` rescue nil ||
43-
`#{win_command}` rescue nil
41+
def sys_command(unix_command, win_command = nil)
42+
unix_result = `#{unix_command}` rescue nil
43+
return unix_result if unix_result != "" && unix_result
44+
win_result = `#{win_command}` rescue nil
45+
win_result != "" && win_result
4446
end
4547
end
4648
end

0 commit comments

Comments
 (0)