Skip to content

Instantly share code, notes, and snippets.

@krimdomu
Created July 24, 2014 12:44
Show Gist options
  • Save krimdomu/98086b9629ba815bbfc5 to your computer and use it in GitHub Desktop.
Save krimdomu/98086b9629ba815bbfc5 to your computer and use it in GitHub Desktop.
check if we are running in a batch
task "one", sub {
if(in_batch()) {
say "in batch";
}
};
task "two", sub {};
sub in_batch {
return Rex::Args->is_opt('b');
}
batch b1 => "one", "two";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment