mirror of https://github.com/actions/toolkit
use zip and unzip from path (#161)
parent
3116829a9b
commit
67eeeea9fa
|
@ -4360,7 +4360,6 @@
|
|||
"minipass": {
|
||||
"version": "2.3.5",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"safe-buffer": "^5.1.2",
|
||||
"yallist": "^3.0.0"
|
||||
|
@ -4556,8 +4555,7 @@
|
|||
},
|
||||
"safe-buffer": {
|
||||
"version": "5.1.2",
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
"bundled": true
|
||||
},
|
||||
"safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
|
@ -4647,8 +4645,7 @@
|
|||
},
|
||||
"yallist": {
|
||||
"version": "3.0.3",
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
"bundled": true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@actions/github",
|
||||
"version": "1.0.1",
|
||||
"version": "1.1.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -287,9 +287,7 @@ describe('@actions/tool-cache', function() {
|
|||
]
|
||||
await exec.exec(`"${powershellPath}"`, args)
|
||||
} else {
|
||||
const zipBin: string =
|
||||
process.platform === 'darwin' ? 'zip-darwin' : 'zip'
|
||||
const zipPath: string = path.join(__dirname, 'externals', zipBin)
|
||||
const zipPath: string = await io.which('zip')
|
||||
await exec.exec(`"${zipPath}`, [zipFile, '-r', '.'], {cwd: stagingDir})
|
||||
}
|
||||
|
||||
|
@ -340,9 +338,7 @@ describe('@actions/tool-cache', function() {
|
|||
]
|
||||
await exec.exec(`"${powershellPath}"`, args)
|
||||
} else {
|
||||
const zipBin: string =
|
||||
process.platform === 'darwin' ? 'zip-darwin' : 'zip'
|
||||
const zipPath = path.join(__dirname, 'externals', zipBin)
|
||||
const zipPath: string = await io.which('zip')
|
||||
await exec.exec(zipPath, [zipFile, '-r', '.'], {cwd: stagingDir})
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@actions/tool-cache",
|
||||
"version": "1.1.0",
|
||||
"version": "1.1.1",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -222,13 +222,9 @@ export async function extractZip(file: string, dest?: string): Promise<string> {
|
|||
|
||||
if (IS_WINDOWS) {
|
||||
await extractZipWin(file, dest)
|
||||
} else {
|
||||
if (process.platform === 'darwin') {
|
||||
await extractZipDarwin(file, dest)
|
||||
} else {
|
||||
await extractZipNix(file, dest)
|
||||
}
|
||||
}
|
||||
|
||||
return dest
|
||||
}
|
||||
|
@ -255,18 +251,7 @@ async function extractZipWin(file: string, dest: string): Promise<void> {
|
|||
}
|
||||
|
||||
async function extractZipNix(file: string, dest: string): Promise<void> {
|
||||
const unzipPath = path.join(__dirname, '..', 'scripts', 'externals', 'unzip')
|
||||
await exec(`"${unzipPath}"`, [file], {cwd: dest})
|
||||
}
|
||||
|
||||
async function extractZipDarwin(file: string, dest: string): Promise<void> {
|
||||
const unzipPath = path.join(
|
||||
__dirname,
|
||||
'..',
|
||||
'scripts',
|
||||
'externals',
|
||||
'unzip-darwin'
|
||||
)
|
||||
const unzipPath = await io.which('unzip')
|
||||
await exec(`"${unzipPath}"`, [file], {cwd: dest})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue