Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Phantsure authored Nov 15, 2022
1 parent 0e707ae commit 5a0405d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/cache/__tests__/tar.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ test('gzip extract GNU tar on windows with GNUtar in path', async () => {
// GNU tar present in path but not at default location
const isGnuMock = jest
.spyOn(utils, 'getGnuTarPathOnWindows')
.mockReturnValue(Promise.resolve('C:\\Program Files\\gnutar\\tar.exe'))
.mockReturnValue(Promise.resolve('tar'))
const execMock = jest.spyOn(exec, 'exec')
const archivePath = `${process.env['windir']}\\fakepath\\cache.tar`
const workspace = process.env['GITHUB_WORKSPACE']
Expand Down
2 changes: 1 addition & 1 deletion packages/cache/src/internal/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ export const DefaultRetryDelay = 5000
export const SocketTimeout = 5000

// The default path of GNUtar on hosted Windows runners
export const GnuTarPathOnWindows = 'C:\\Program Files\\Git\\usr\\bin\\tar.exe'
export const GnuTarPathOnWindows = 'C:\\Program Files\\Git\\usr\\bin\\tar.exe'
5 changes: 1 addition & 4 deletions packages/cache/src/internal/tar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ import {CompressionMethod} from './constants'

const IS_WINDOWS = process.platform === 'win32'

async function getTarPath(
args: string[],
compressionMethod: CompressionMethod
): Promise<string> {
async function getTarPath(args: string[]): Promise<string> {
let tarPath = await io.which('tar', true)
switch (process.platform) {
case 'win32': {
Expand Down

0 comments on commit 5a0405d

Please sign in to comment.