1
0
Fork 0

Small fix for the tool-cache extract example (#99)

* Fix tool-cache extract example

* Use extractZip or extract7z in tool-cache example fix
pull/101/head
Guillaume Clochard 2019-08-29 17:08:06 +02:00 committed by Danny McCormick
parent e35e0e640b
commit ac36ca4405
1 changed files with 3 additions and 3 deletions

View File

@ -22,11 +22,11 @@ These can then be extracted in platform specific ways:
const tc = require('@actions/tool-cache');
if (process.platform === 'win32') {
tc.downloadTool('http://nodejs.org/dist/v12.7.0/node-v12.7.0-win-x64.zip');
const node12Path = tc.downloadTool('http://nodejs.org/dist/v12.7.0/node-v12.7.0-win-x64.zip');
const node12ExtractedFolder = await tc.extractZip(node12Path, 'path/to/extract/to');
// Or alternately
tc.downloadTool('http://nodejs.org/dist/v12.7.0/node-v12.7.0-win-x64.7z');
const node12Path = tc.downloadTool('http://nodejs.org/dist/v12.7.0/node-v12.7.0-win-x64.7z');
const node12ExtractedFolder = await tc.extract7z(node12Path, 'path/to/extract/to');
}
else {