Skip to content

Commit

Permalink
tar -tf will detect compressed tars correctly.
Browse files Browse the repository at this point in the history
`tar -tzf` will seemingly blindly filter with gzip which causes
single-file ZIPs to be accidentally understood as tgz files.

If we match such a tar we explode trying to untar as that call doesn't
pass the option to uncompress and correctly spots that the file is not a
tar.

Closes #984.
  • Loading branch information
mthx committed Sep 14, 2018
1 parent 8388452 commit ca89368
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion workflow/executor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ func (we *WorkflowExecutor) AddAnnotation(key, value string) error {

// isTarball returns whether or not the file is a tarball
func isTarball(filePath string) bool {
cmd := exec.Command("tar", "-tzf", filePath)
cmd := exec.Command("tar", "-tf", filePath)
log.Info(cmd.Args)
err := cmd.Run()
return err == nil
Expand Down

0 comments on commit ca89368

Please sign in to comment.