This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new b3d77524 Add svn! method to check for errors
b3d77524 is described below
commit b3d7752428e8684b11f295f3b9bdc0019879b05c
Author: Sebb <[email protected]>
AuthorDate: Sun Dec 31 13:38:53 2023 +0000
Add svn! method to check for errors
---
lib/whimsy/asf/svn.rb | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/lib/whimsy/asf/svn.rb b/lib/whimsy/asf/svn.rb
index 75139463..9c95f78b 100644
--- a/lib/whimsy/asf/svn.rb
+++ b/lib/whimsy/asf/svn.rb
@@ -430,6 +430,13 @@ module ASF
end
end
+ # as for self.svn, but failure raises an error
+ def self.svn!(command, path, options = {})
+ out, err = self.svn(command, path, options = options)
+ raise Exception.new("SVN command failed: #{err}") if out.nil?
+ return out, err
+ end
+
# low level SVN command for use in Wunderbar context (_json, _text etc)
# params:
# command - info, list etc