Skip to content

Commit 6a1871c

Browse files
committed
Log npm & yarn versions
1 parent 6ecfd2d commit 6a1871c

File tree

10 files changed

+44
-32
lines changed

10 files changed

+44
-32
lines changed

lib/setup-node.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
1616
};
1717
Object.defineProperty(exports, "__esModule", { value: true });
1818
const core = __importStar(require("@actions/core"));
19+
const exec_1 = require("@actions/exec");
1920
const installer = __importStar(require("./installer"));
2021
const auth = __importStar(require("./authutil"));
2122
const path = __importStar(require("path"));
@@ -44,6 +45,8 @@ function run() {
4445
console.log(`##[add-matcher]${path.join(matchersPath, 'tsc.json')}`);
4546
console.log(`##[add-matcher]${path.join(matchersPath, 'eslint-stylish.json')}`);
4647
console.log(`##[add-matcher]${path.join(matchersPath, 'eslint-compact.json')}`);
48+
yield exec_1.exec('npm --version');
49+
yield exec_1.exec('yarn --version');
4750
}
4851
catch (error) {
4952
core.setFailed(error.message);

node_modules/@actions/exec/README.md

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@actions/exec/lib/exec.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@actions/exec/lib/exec.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@actions/exec/lib/toolrunner.js

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@actions/exec/lib/toolrunner.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@actions/exec/package.json

Lines changed: 19 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@
2323
"license": "MIT",
2424
"dependencies": {
2525
"@actions/core": "^1.0.0",
26+
"@actions/exec": "^1.0.1",
2627
"@actions/github": "^1.0.0",
2728
"@actions/io": "^1.0.0",
2829
"@actions/tool-cache": "^1.0.0",
29-
"typed-rest-client": "^1.5.0",
30-
"semver": "^6.1.1"
30+
"semver": "^6.1.1",
31+
"typed-rest-client": "^1.5.0"
3132
},
3233
"devDependencies": {
3334
"@types/jest": "^24.0.13",

src/setup-node.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as core from '@actions/core';
2+
import {exec} from '@actions/exec';
23
import * as installer from './installer';
34
import * as auth from './authutil';
45
import * as path from 'path';
@@ -33,6 +34,8 @@ async function run() {
3334
console.log(
3435
`##[add-matcher]${path.join(matchersPath, 'eslint-compact.json')}`
3536
);
37+
await exec('npm --version');
38+
await exec('yarn --version');
3639
} catch (error) {
3740
core.setFailed(error.message);
3841
}

0 commit comments

Comments
 (0)