File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -15201,6 +15201,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
15201
15201
};
15202
15202
Object.defineProperty(exports, "__esModule", { value: true });
15203
15203
const core = __importStar(__webpack_require__(470));
15204
+ const exec = __importStar(__webpack_require__(986));
15204
15205
const installer = __importStar(__webpack_require__(749));
15205
15206
const auth = __importStar(__webpack_require__(202));
15206
15207
const path = __importStar(__webpack_require__(622));
@@ -15218,6 +15219,12 @@ function run() {
15218
15219
if (version) {
15219
15220
yield installer.getNode(version);
15220
15221
}
15222
+ // Output version of node and npm that are being used
15223
+ yield exec.exec('node', ['--version']);
15224
+ // Older versions of Node don't include npm, so don't let this call fail
15225
+ yield exec.exec('npm', ['--version'], {
15226
+ ignoreReturnCode: true
15227
+ });
15221
15228
const registryUrl = core.getInput('registry-url');
15222
15229
const alwaysAuth = core.getInput('always-auth');
15223
15230
if (registryUrl) {
Original file line number Diff line number Diff line change 24
24
"license" : " MIT" ,
25
25
"dependencies" : {
26
26
"@actions/core" : " ^1.2.2" ,
27
+ "@actions/exec" : " ^1.0.3" ,
27
28
"@actions/github" : " ^1.1.0" ,
28
29
"@actions/http-client" : " ^1.0.6" ,
29
30
"@actions/io" : " ^1.0.2" ,
Original file line number Diff line number Diff line change 1
1
import * as core from '@actions/core' ;
2
+ import * as exec from '@actions/exec' ;
3
+ import * as io from '@actions/io' ;
2
4
import * as installer from './installer' ;
3
5
import * as auth from './authutil' ;
4
6
import * as path from 'path' ;
@@ -17,6 +19,14 @@ async function run() {
17
19
await installer . getNode ( version ) ;
18
20
}
19
21
22
+ // Output version of node and npm that are being used
23
+ await exec . exec ( 'node' , [ '--version' ] ) ;
24
+
25
+ // Older versions of Node don't include npm, so don't let this call fail
26
+ await exec . exec ( 'npm' , [ '--version' ] , {
27
+ ignoreReturnCode : true
28
+ } ) ;
29
+
20
30
const registryUrl : string = core . getInput ( 'registry-url' ) ;
21
31
const alwaysAuth : string = core . getInput ( 'always-auth' ) ;
22
32
if ( registryUrl ) {
You can’t perform that action at this time.
0 commit comments