From 0ecc141d4e2c707fcdf3aeaa1801cfa1758b1683 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Mon, 10 Feb 2020 04:15:26 +0100 Subject: [PATCH] await tc.downloadTool (#337) --- packages/tool-cache/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/tool-cache/README.md b/packages/tool-cache/README.md index 335f34b6..a1513d35 100644 --- a/packages/tool-cache/README.md +++ b/packages/tool-cache/README.md @@ -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 {