mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-04-06 01:53:16 +08:00
Fix test
This commit is contained in:
7
packages/cache/src/internal/tar.ts
vendored
7
packages/cache/src/internal/tar.ts
vendored
@@ -56,7 +56,7 @@ async function getTarArgs(
|
||||
type: string,
|
||||
archivePath = ''
|
||||
): Promise<string[]> {
|
||||
const args = [tarPath.path]
|
||||
const args = [`"${tarPath.path}"`]
|
||||
const cacheFileName = utils.getCacheFileName(compressionMethod)
|
||||
const tarFile = 'cache.tar'
|
||||
const workingDirectory = getWorkingDirectory()
|
||||
@@ -260,11 +260,10 @@ export async function createTar(
|
||||
compressionMethod: CompressionMethod
|
||||
): Promise<void> {
|
||||
// Write source directories to manifest.txt to avoid command length limits
|
||||
const manifestFilename = 'manifest.txt'
|
||||
writeFileSync(
|
||||
path.join(archiveFolder, manifestFilename),
|
||||
path.join(archiveFolder, ManifestFilename),
|
||||
sourceDirectories.join('\n')
|
||||
)
|
||||
const args = await getArgs(compressionMethod, 'create')
|
||||
await exec(args)
|
||||
await exec(args, undefined, {cwd: archiveFolder})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user