Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
use absolute paths where possible
  • Loading branch information
FROGGS committed Feb 27, 2014
1 parent 9fb996e commit 026cd23
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bin/panda-build
Expand Up @@ -2,5 +2,5 @@
use Panda::Builder;

sub MAIN($where = '.') {
Panda::Builder.build($where);
Panda::Builder.build($where.path.absolute);
}
2 changes: 1 addition & 1 deletion bin/panda-fetch
Expand Up @@ -6,5 +6,5 @@ sub MAIN($from, $to? is copy) {
note "Fetching to ./work";
$to = 'work';
}
Panda::Fetcher.fetch($from, $to);
Panda::Fetcher.fetch($from.path.absolute, $to.path.absolute);
}
2 changes: 1 addition & 1 deletion bin/panda-install
Expand Up @@ -2,5 +2,5 @@
use Panda::Installer;

sub MAIN($from = '.', $to?) {
Panda::Installer.new.install($from, $to);
Panda::Installer.new.install($from.path.absolute, $to);
}
2 changes: 1 addition & 1 deletion bin/panda-test
Expand Up @@ -2,5 +2,5 @@
use Panda::Tester;

sub MAIN($where = '.') {
Panda::Tester.test($where);
Panda::Tester.test($where.path.absolute);
}
2 changes: 1 addition & 1 deletion bin/redpanda
Expand Up @@ -27,7 +27,7 @@ sub get-meta($module is copy) {
}

sub MAIN($url) {
my $dir = '.work';
my $dir = '.work'.path.absolute;
rm_rf $dir;
try {
Panda::Fetcher::fetch($url, $dir);
Expand Down
2 changes: 1 addition & 1 deletion lib/Panda.pm
Expand Up @@ -9,7 +9,7 @@ use JSON::Tiny;

sub tmpdir {
state $i = 0;
".work/{time}_{$i++}"
".work/{time}_{$i++}".path.absolute
}

class Panda {
Expand Down
4 changes: 2 additions & 2 deletions lib/Panda/Common.pm
Expand Up @@ -5,9 +5,9 @@ sub dirname ($mod as Str) is export {
$mod.subst(':', '_', :g);
}

sub indir (Str $where, Callable $what) is export {
sub indir ($where, Callable $what) is export {
mkpath $where;
temp $*CWD = IO::Spec.rel2abs($where);
temp $*CWD = $where.path.absolute;
$what()
}

Expand Down

0 comments on commit 026cd23

Please sign in to comment.