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

spang at bestpractical.com spang at bestpractical.com
Thu Jan 8 04:48:13 EST 2009


Author: spang
Date: Thu Jan  8 04:48:10 2009
New Revision: 17636

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

Log:
 r53394 at loki:  spang | 2009-01-08 11:42:07 +0200
 convert PROPHET_REPO to an absolute path if it is relative


Modified: Prophet/trunk/lib/Prophet/App.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/App.pm	(original)
+++ Prophet/trunk/lib/Prophet/App.pm	Thu Jan  8 04:48:10 2009
@@ -10,6 +10,11 @@
     lazy    => 1,
     default => sub {
         my $self = shift;
+        if ( $ENV{'PROPHET_REPO'} && !File::Spec->file_name_is_absolute($ENV{'PROPHET_REPO'}) ) {
+            # if PROPHET_REPO env var exists and is relative, make it absolute
+            # to avoid breakage/confusing error messages later
+            $ENV{'PROPHET_REPO'} = File::Spec->rel2abs($ENV{'PROPHET_REPO'});
+        }
         my $root = $ENV{'PROPHET_REPO'} || File::Spec->catdir($ENV{'HOME'}, '.prophet');
         my $type = $self->default_replica_type;
         return Prophet::Replica->get_handle( url => $type.':file://' . $root, app_handle => $self, 



More information about the Bps-public-commit mailing list