Skip to content

Commit

Permalink
better debugging and recursively creates path
Browse files Browse the repository at this point in the history
this fixes a problem where panda does not attempt to create the full directory
structure if it does not exist (which is likely on a new install). Also
provide a better error message that includes the path panda is trying to use
in the event it is not writeable

Signed-off-by: Caleb Cushing <xenoterracide@gmail.com>
  • Loading branch information
xenoterracide committed Nov 16, 2012
1 parent ec22a1e commit 1361fcb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bootstrap.pl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl6
use v6;
use Shell::Command;

say '==> Bootstrapping Panda';

Expand All @@ -12,10 +13,11 @@
$destdir = $prefix;
$panda-base = "$prefix/panda";
try mkdir $destdir;
try mkdir $panda-base unless $panda-base.IO ~~ :d;
try mkpath $panda-base unless $panda-base.IO ~~ :d;
last if $panda-base.path.w
}
unless $panda-base.path.w {
warn "panda-base: { $panda-base.perl }";
die "Found no writable directory into which panda could be installed";
}

Expand Down

0 comments on commit 1361fcb

Please sign in to comment.