Skip to content

Commit

Permalink
await tc.downloadTool (actions#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
fniephaus authored Feb 10, 2020
1 parent 432a78c commit 0ecc141
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/tool-cache/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ These can then be extracted in platform specific ways:
const tc = require('@actions/tool-cache');

if (process.platform === 'win32') {
const node12Path = tc.downloadTool('https://nodejs.org/dist/v12.7.0/node-v12.7.0-win-x64.zip');
const node12Path = await tc.downloadTool('https://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
const node12Path = tc.downloadTool('https://nodejs.org/dist/v12.7.0/node-v12.7.0-win-x64.7z');
const node12Path = await tc.downloadTool('https://nodejs.org/dist/v12.7.0/node-v12.7.0-win-x64.7z');
const node12ExtractedFolder = await tc.extract7z(node12Path, 'path/to/extract/to');
}
else {
Expand Down

0 comments on commit 0ecc141

Please sign in to comment.