Skip to content

Commit 42d59fb

Browse files
committed
feat: add arch to run
1 parent 2d88871 commit 42d59fb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/main.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import * as installer from './installer';
33
import * as auth from './authutil';
44
import * as path from 'path';
55
import {URL} from 'url';
6+
import os = require('os');
67

78
export async function run() {
89
try {
@@ -15,13 +16,18 @@ export async function run() {
1516
version = core.getInput('version');
1617
}
1718

19+
let arch = core.getInput('node-arch');
20+
if (!arch) {
21+
arch = os.arch();
22+
}
23+
1824
if (version) {
1925
let token = core.getInput('token');
2026
let auth = !token || isGhes() ? undefined : `token ${token}`;
2127
let stable = (core.getInput('stable') || 'true').toUpperCase() === 'TRUE';
2228
const checkLatest =
2329
(core.getInput('check-latest') || 'false').toUpperCase() === 'TRUE';
24-
await installer.getNode(version, stable, checkLatest, auth);
30+
await installer.getNode(version, stable, checkLatest, auth, arch);
2531
}
2632

2733
const registryUrl: string = core.getInput('registry-url');

0 commit comments

Comments
 (0)