Skip to content

Commit

Permalink
Don't try to treat Windows specially. It's a bit hopeless.
Browse files Browse the repository at this point in the history
  • Loading branch information
briandfoy committed Jun 22, 2023
1 parent 6bacaf6 commit 105cc7c
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions bin/cp
Expand Up @@ -50,16 +50,7 @@ sub run {
my( $source, $destination ) = @args;

my @unix_like = qw(darwin freebsd linux);
if( $^O eq 'MSWin32' ) {
# https://home.csulb.edu/~murdock/copy.html
my @command = 'copy';
push @command, '/-Y' if $opts{i};
push @command, $source, $destination;

print "cp $source $destination\n" if $opts{v};
my $rc = system { $command[0] } @command
}
elsif( grep { $^O eq $_ } @unix_like and in_path('cp') ) {
if( grep { $^O eq $_ } @unix_like and in_path('cp') ) {
# Although File::Copy seems like it should do the right thing,
# it doesn't.
my @command = 'cp';
Expand Down

0 comments on commit 105cc7c

Please sign in to comment.