mirror of
https://github.com/actions/setup-node
synced 2024-12-22 21:22:42 +00:00
Rename node-arch to architecture
This commit is contained in:
parent
aabe026707
commit
5984462aaa
5 changed files with 12 additions and 12 deletions
|
@ -91,21 +91,21 @@ jobs:
|
|||
- 10
|
||||
- 12
|
||||
- 14
|
||||
node_arch:
|
||||
architecture:
|
||||
- x64
|
||||
# an extra windows-x86 run:
|
||||
include:
|
||||
- os: windows-2016
|
||||
node_version: 12
|
||||
node_arch: x86
|
||||
name: Node ${{ matrix.node_version }} - ${{ matrix.node_arch }} on ${{ matrix.os }}
|
||||
architecture: x86
|
||||
name: Node ${{ matrix.node_version }} - ${{ matrix.architecture }} on ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node_version }}
|
||||
node-arch: ${{ matrix.node_arch }}
|
||||
architecture: ${{ matrix.architecture }}
|
||||
- run: npm install
|
||||
- run: npm test
|
||||
```
|
||||
|
|
|
@ -356,7 +356,7 @@ describe('setup-node', () => {
|
|||
}[os.platform];
|
||||
|
||||
inputs['node-version'] = version;
|
||||
inputs['node-arch'] = arch;
|
||||
inputs['architecture'] = arch;
|
||||
inputs['always-auth'] = false;
|
||||
inputs['token'] = 'faketoken';
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ inputs:
|
|||
default: 'false'
|
||||
node-version:
|
||||
description: 'Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0'
|
||||
node-arch:
|
||||
architecture:
|
||||
description: 'Target architecture for Node to use. Examples: x86, x64. Will use system architecture by default.'
|
||||
check-latest:
|
||||
description: 'Set this option if you want the action to check for the latest available version that satisfies the version spec'
|
||||
|
|
6
dist/index.js
vendored
6
dist/index.js
vendored
|
@ -4706,11 +4706,11 @@ function run() {
|
|||
if (!version) {
|
||||
version = core.getInput('version');
|
||||
}
|
||||
let arch = core.getInput('node-arch');
|
||||
// if node-arch supplied but node-version is not
|
||||
let arch = core.getInput('architecture');
|
||||
// if architecture supplied but node-version is not
|
||||
// if we don't throw a warning, the already installed x64 node will be used which is not probably what user meant.
|
||||
if (arch && !version) {
|
||||
core.warning('`node-arch` is provided but `node-version` is missing. This results in using an already installed x64 node which is not probably what you meant. To fix this, provide `node-arch` in combination with `node-version`');
|
||||
core.warning('`architecture` is provided but `node-version` is missing. This results in using an already installed x64 node which is not probably what you meant. To fix this, provide `architecture` in combination with `node-version`');
|
||||
}
|
||||
if (!arch) {
|
||||
arch = os.arch();
|
||||
|
|
|
@ -16,13 +16,13 @@ export async function run() {
|
|||
version = core.getInput('version');
|
||||
}
|
||||
|
||||
let arch = core.getInput('node-arch');
|
||||
let arch = core.getInput('architecture');
|
||||
|
||||
// if node-arch supplied but node-version is not
|
||||
// if architecture supplied but node-version is not
|
||||
// if we don't throw a warning, the already installed x64 node will be used which is not probably what user meant.
|
||||
if (arch && !version) {
|
||||
core.warning(
|
||||
'`node-arch` is provided but `node-version` is missing. This results in using an already installed x64 node which is not probably what you meant. To fix this, provide `node-arch` in combination with `node-version`'
|
||||
'`architecture` is provided but `node-version` is missing. This results in using an already installed x64 node which is not probably what you meant. To fix this, provide `architecture` in combination with `node-version`'
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue