[Bps-public-commit] r14901 - in Prophet/trunk: .

sartak at bestpractical.com sartak at bestpractical.com
Thu Aug 7 15:44:08 EDT 2008


Author: sartak
Date: Thu Aug  7 15:44:08 2008
New Revision: 14901

Modified:
   Prophet/trunk/   (props changed)
   Prophet/trunk/lib/Prophet/CLI/PublishCommand.pm

Log:
 r68947 at onn:  sartak | 2008-08-07 15:43:59 -0400
 Check that rsync was successfully invoked, and if not, explain that the user must have rsync installed


Modified: Prophet/trunk/lib/Prophet/CLI/PublishCommand.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/CLI/PublishCommand.pm	(original)
+++ Prophet/trunk/lib/Prophet/CLI/PublishCommand.pm	Thu Aug  7 15:44:08 2008
@@ -20,7 +20,16 @@
 
     push @args, $args{to};
 
-    system("rsync", @args);
+    my $rsync = $ENV{RSYNC} || "rsync";
+    my $ret = system($rsync, @args);
+
+    if ($ret == -1) {
+        die "You must have 'rsync' installed to use this command.
+
+If you have rsync but it's not in your path, set environment variable \$RSYNC to the absolute path of your rsync executable.\n";
+    }
+
+    return $ret;
 }
 
 no Moose::Role;



More information about the Bps-public-commit mailing list