openshift-vsts icon indicating copy to clipboard operation
openshift-vsts copied to clipboard

Possible error when using archives with .tar.<extension>

Open lstocchi opened this issue 3 years ago • 0 comments

          If the value of `archive` is `archiv.tar.bz2`, archiveType would not be correctly set.

I would have suggested to use path.basename instead of replace:

let archiveType = path.extname(archive);
if (path.extname(path.basename(archive)) === '.tar') {
  archiveType = '.tar' + archiveType;
}

Originally posted by @schurlinga in https://github.com/redhat-developer/openshift-vsts/pull/215#discussion_r1098433414

lstocchi avatar Feb 07 '23 10:02 lstocchi