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/07 19:33:05 UTC

[whimsy] branch master updated: Use _.system for dryrun output

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 5c1a1b7  Use _.system for dryrun output
5c1a1b7 is described below

commit 5c1a1b7272556c9999d86cc688b6278d868dd709
Author: Sebb <se...@apache.org>
AuthorDate: Sun Jun 7 20:32:56 2020 +0100

    Use _.system for dryrun output
---
 lib/whimsy/asf/svn.rb | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/lib/whimsy/asf/svn.rb b/lib/whimsy/asf/svn.rb
index e85a2d7..b11cbba 100644
--- a/lib/whimsy/asf/svn.rb
+++ b/lib/whimsy/asf/svn.rb
@@ -366,7 +366,10 @@ module ASF
         end
       end
 
-      p cmd if options[:dryrun] # before creds added
+      if options[:dryrun] # before creds added
+        # TODO: improve this
+        return _.system ['echo', cmd.inspect]
+      end
 
       # add credentials if required
       open_opts = {}
@@ -392,12 +395,7 @@ module ASF
 
       p cmd if options[:verbose] # includes auth
 
-      # issue svn command
-      if options[:dryrun]
-        0 # TODO is this the correct return value?
-      else
-        _.system cmd
-      end
+      _.system cmd
     end
 
     # retrieve revision, [err] for a path in svn