Skip to content

Commit

Permalink
Add svn! method to check for errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbASF committed Dec 31, 2023
1 parent 46bfd5a commit b3d7752
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/whimsy/asf/svn.rb
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,13 @@ def self.svn(command, path, options = {})
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
Expand Down

0 comments on commit b3d7752

Please sign in to comment.