File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -177,11 +177,12 @@ sub untar {
177177 local *TARTEST;
178178 my $tarbin = $self -> hub-> {TARBIN };
179179 my $MLROOT = $self -> mlroot;
180- my $tar_opt = " tzf" ;
180+ my $tar_opt = " - tzf" ;
181181 if ($dist =~ / \. (?:tar\. bz2|tbz)$ / ) {
182- $tar_opt = " tjf" ;
182+ $tar_opt = " - tjf" ;
183183 }
184- open TARTEST, " $tarbin $tar_opt $MLROOT /$dist |" ;
184+ my $ignore_unknown_keyword = ' --warning=no-unknown-keyword' ;
185+ open TARTEST, " $tarbin $ignore_unknown_keyword $tar_opt $MLROOT /$dist |" ;
185186 while (<TARTEST>) {
186187 if (m : ^\.\. /: || m : /\.\. /: ) {
187188 $Logger -> log (" *** ALERT: updir detected!" );
@@ -200,12 +201,12 @@ sub untar {
200201 $self -> {COULD_NOT_UNTAR }++;
201202 return ;
202203 }
203- $tar_opt = " xzf" ;
204+ $tar_opt = " - xzf" ;
204205 if ($dist =~ / \. (?:tar\. bz2|tbz)$ / ) {
205- $tar_opt = " xjf" ;
206+ $tar_opt = " - xjf" ;
206207 }
207208
208- my @cmd = ($tarbin , $tar_opt , " $MLROOT /$dist " );
209+ my @cmd = ($tarbin , $ignore_unknown_keyword , $ tar_opt , " $MLROOT /$dist " );
209210 $Logger -> log ([ " going to untar with: %s " , \@cmd ]);
210211
211212 unless (system (@cmd )==0) {
You can’t perform that action at this time.
0 commit comments