Skip to content

Commit c58f8fb

Browse files
committed
Read all of stderr.
1 parent 698d0fe commit c58f8fb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.rubocop_todo.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2025-10-01 13:23:05 UTC using RuboCop version 1.81.1.
3+
# on 2025-10-01 13:39:51 UTC using RuboCop version 1.81.1.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new

slack-api-explorer/commands/slack.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def self.call(client, data, match)
1212
logger.info "SLACK: #{client.owner} - #{expression}"
1313
args, pipe = Shellwords.parse(expression)
1414
execute(client, args) do |output, error|
15-
if error
15+
if error && !error.blank?
1616
client.say(channel: data.channel, text: "```\n#{error}```")
1717
else
1818
output = pipe ? JsonPath.on(output, pipe) : JSON.parse(output)
@@ -31,7 +31,7 @@ def self.execute(client, args)
3131
client.owner.token,
3232
args
3333
].flatten) do |_, stdout, stderr, _|
34-
yield stdout.read.try(:strip), stderr.gets.try(:strip)
34+
yield stdout.read&.strip, stderr.read&.strip
3535
end
3636
end
3737
end

0 commit comments

Comments
 (0)