diff --git a/packages/tool-cache/src/tool-cache.ts b/packages/tool-cache/src/tool-cache.ts index 9ab2deb5ae..5cff06bf9c 100644 --- a/packages/tool-cache/src/tool-cache.ts +++ b/packages/tool-cache/src/tool-cache.ts @@ -200,6 +200,10 @@ export async function extractTar( } dest = dest || (await _createExtractFolder(dest)) + if (IS_WINDOWS) { + // For some reason, GNU Tar on Windows expects paths to be slash-separated even though this is not the standard Windows path delimiter + dest = dest.replace(/\\/g, '/') + } const tarPath: string = await io.which('tar', true) await exec(`"${tarPath}"`, [flags, '-C', dest, '-f', file])