Skip to content

Commit

Permalink
Replace rmtree, fix parameter passing
Browse files Browse the repository at this point in the history
remove_tree is the modern (v2+) method for this, so replace rmtree with this.
Also fix it so that the parameter is passed correctly.
This resolves an issue with replacing tags.
  • Loading branch information
EqUaTe authored Jun 9, 2017
1 parent b3ea13f commit 0b6bf24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Rex/Repositorio.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use XML::LibXML;
use XML::Simple;
use Params::Validate qw(:all);
use IO::All;
use File::Path 'make_path';
use File::Path 'make_path', 'remove_tree';
use File::Basename qw'dirname';
use File::Spec;
use File::Copy;
Expand Down Expand Up @@ -450,7 +450,7 @@ sub tag {
if ( -e $tag_dir ) {
if( $option{force} ) {
$self->logger->debug("Removing $tag_dir");
rmtree $tag_dir; # should be remove_tree, but will use legacy to match mkdir
remove_tree ( $tag_dir );
}
else {
$self->logger->log_and_croak(level => 'error', message => "Tag $option{tag} on repo $option{repo} already exists (${tag_dir}), use --force\n");
Expand Down

0 comments on commit 0b6bf24

Please sign in to comment.