use strict;
use warnings;
-use Cwd qw/cwd abs_path/;
-use File::Spec::Functions qw/canonpath catdir splitdir abs2rel file_name_is_absolute/;
+use Cwd qw/cwd abs_path/;
+use File::Spec::Functions qw/canonpath catdir splitdir abs2rel/;
use POSIX qw/WIFEXITED WEXITSTATUS WIFSIGNALED WTERMSIG SIGINT SIGQUIT/;
BEGIN {
my %args = @_;
my $dir = $args{dir};
- $dir = abs_path $dir if defined $dir and not file_name_is_absolute $dir;
- $dir = cwd unless defined $dir;
- $dir = canonpath $dir;
+ if (defined $dir) {
+ $dir = abs_path $dir;
+ } else {
+ $dir = cwd;
+ }
+ $dir = canonpath $dir;
my ($repo, $bare, $name, $work);
if ($args{fake}) {