sshkit 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  This file is written in reverse chronological order, newer releases will
4
4
  appear at the top.
5
5
 
6
+ ## 0.0.12
7
+
8
+ * Also print anything the program wrote to stdout when the exit status is
9
+ non-zero and the command raises an error. (assits debugging badly behaved
10
+ programs that fail, and write their error output to stdout.)
11
+
6
12
  ## 0.0.11
7
13
 
8
14
  * Implementing confuguration objects on the backends (WIP, undocumented)
@@ -86,7 +86,10 @@ module SSHKit
86
86
  @finished_at = Time.now
87
87
  @exit_status = new_exit_status
88
88
  if options[:raise_on_non_zero_exit] && exit_status > 0
89
- raise Failed, stderr.empty? ? "No messages written to stderr" : stderr.strip
89
+ message = ""
90
+ message += (stdout.strip.empty? ? "No messages written to stdout\n" : stdout.strip)
91
+ message += (stderr.strip.empty? ? "No messages written to stderr\n" : stderr.strip)
92
+ raise Failed, message
90
93
  end
91
94
  end
92
95
 
@@ -1,3 +1,3 @@
1
1
  module SSHKit
2
- VERSION = "0.0.11"
2
+ VERSION = "0.0.12"
3
3
  end
@@ -159,7 +159,7 @@ module SSHKit
159
159
  error = assert_raises SSHKit::Command::Failed do
160
160
  Command.new(:whoami).exit_status = 1
161
161
  end
162
- assert_equal "No messages written to stderr", error.message
162
+ assert_equal "No messages written to stdout\nNo messages written to stderr\n", error.message
163
163
  end
164
164
 
165
165
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sshkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: