diff options
-rw-r--r-- | libpiny/lib/Piny/Repo.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libpiny/lib/Piny/Repo.pm b/libpiny/lib/Piny/Repo.pm index e018e37..4e1b767 100644 --- a/libpiny/lib/Piny/Repo.pm +++ b/libpiny/lib/Piny/Repo.pm @@ -479,7 +479,12 @@ sub create { system( "/bin/rm", "-r", $repo->path ) and die "Failed to clean up after failed clone operation!"; die( "Could not clone repository!\n" ); } else { - if( Piny::Repo->new( $remote ) ) { + my $valid = 0; + eval { + Piny::Repo->new( $remote )->config->_conf; + $valid = 1; + }; + if( $valid ) { copy( $remote . ".git/config", $repo->path . "/config" ) or die "Config copy failed: $!"; } else { print( "$remote is not local, unable to copy config file."); |