Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

Fixes #20984 - k-c-h print command output on error #535

Merged
merged 1 commit into from
Sep 21, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions katello/katello-change-hostname
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ raise 'Must run as root' unless Process.uid == 0
def run_cmd(command, exit_codes=[0], message=nil)
result = `#{command}`
unless exit_codes.include?($?.exitstatus)
STDOUT.puts result
STDOUT.puts message if message
fail_with_message("Failed '#{command}' with exit code #{$?.exitstatus}")
end
Expand Down