Skip to content

Instantly share code, notes, and snippets.

@muraiki
Created April 29, 2015 02:54
Show Gist options
  • Save muraiki/1211c20fc0d1f2f7af33 to your computer and use it in GitHub Desktop.
Save muraiki/1211c20fc0d1f2f7af33 to your computer and use it in GitHub Desktop.
P6opaque: no such attribute '$!tappers_lock'
sub checkoutGit($repo) {
say "$repo<name>: git checkout";
my $proc = Proc::Async.new("git", "clone", $repo<source>, $repo<destination>);
my $stdout;
my $stderr;
$proc.stdout.tap(-> $str { $stdout = $stdout ~ $str; });
$proc.stderr.tap(-> $str { $stderr = $stderr ~ $str; });
my $promise = $proc.start;
await $promise;
if $promise.status != Kept or $promise.result.exitcode != 0 or $promise.result.signal != 0 {
die X::AdHoc.new(payload => "$repo<name>: git checkout failed");
}
return True;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment