You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2020/06/17 15:29:47 UTC
[whimsy] branch master updated: Must only return status from svn_
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 0532464 Must only return status from svn_
0532464 is described below
commit 05324646a19202369319e090e70abc7794c9e6ae
Author: Sebb <se...@apache.org>
AuthorDate: Wed Jun 17 16:29:38 2020 +0100
Must only return status from svn_
---
lib/whimsy/asf/svn.rb | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/whimsy/asf/svn.rb b/lib/whimsy/asf/svn.rb
index a0bf5ac..0d73b6e 100644
--- a/lib/whimsy/asf/svn.rb
+++ b/lib/whimsy/asf/svn.rb
@@ -379,6 +379,7 @@ module ASF
#
# Returns:
# - status code
+ # May raise ArgumentError
def self.svn_(command, path, _, options = {})
raise ArgumentError.new 'command must not be nil' unless command
raise ArgumentError.new 'path must not be nil' unless path
@@ -389,7 +390,7 @@ module ASF
bad_keys = options.keys - VALID_KEYS
if bad_keys.size > 0
- return nil, "Following options not recognised: #{bad_keys.inspect}"
+ raise ArgumentError.new "Following options not recognised: #{bad_keys.inspect}"
end
# build svn command
@@ -402,7 +403,7 @@ module ASF
elsif args.is_a? Array
cmd += args
else
- return nil, "args '#{args.inspect}' must be string or array"
+ raise ArgumentError.new "args '#{args.inspect}' must be string or array"
end
end