diff options
author | Steven Danna <steve@opscode.com> | 2015-03-04 11:30:14 +0000 |
---|---|---|
committer | Steven Danna <steve@opscode.com> | 2015-03-04 11:30:14 +0000 |
commit | 0bb2861228fd33fd6a4ef296a1dd223abb6dec9f (patch) | |
tree | b8d832eb826f7d42f203996622e7391c3499f9a5 /lib | |
parent | 8ef1fa7f78c43472c5bbe4b2a5c7ff69f36d9c28 (diff) | |
parent | 0e8630d65a859332f9b580e0d10295c2f40b86ef (diff) | |
download | chef-0bb2861228fd33fd6a4ef296a1dd223abb6dec9f.tar.gz |
Merge branch 'ryan/knife_ssh_on_error'
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/knife/ssh.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/chef/knife/ssh.rb b/lib/chef/knife/ssh.rb index 4569cc097e..db0fb7dd41 100644 --- a/lib/chef/knife/ssh.rb +++ b/lib/chef/knife/ssh.rb @@ -103,6 +103,13 @@ class Chef :boolean => true, :default => true + option :on_error, + :short => '-e', + :long => '--exit-on-error', + :description => "Immediately exit if an error is encountered", + :boolean => true, + :proc => Proc.new { :raise } + def session config[:on_error] ||= :skip ssh_error_handler = Proc.new do |server| |