Only use zstd on windows when gnu tar is installed, otherwise use gzip due to bug #301

This commit is contained in:
Aiqiao Yan
2020-05-18 16:35:13 -04:00
parent 77761a4dc9
commit 5112dc231e
3 changed files with 22 additions and 12 deletions

View File

@@ -95,7 +95,7 @@ test('gzip extract GNU tar on windows', async () => {
jest.spyOn(fs, 'existsSync').mockReturnValueOnce(false)
const isGnuMock = jest
.spyOn(utils, 'useGnuTar')
.spyOn(utils, 'isGnuTarInstalled')
.mockReturnValue(Promise.resolve(true))
const execMock = jest.spyOn(exec, 'exec')
const archivePath = `${process.env['windir']}\\fakepath\\cache.tar`