mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-06-09 05:31:11 +00:00
Merge remote-tracking branch 'refs/remotes/origin/pull209' into pull209
This commit is contained in:
commit
e75d7c128f
7 changed files with 72 additions and 24 deletions
|
@ -78,7 +78,9 @@ function resolveVersionInput(): string {
|
|||
const versionFileInput = core.getInput('node-version-file');
|
||||
|
||||
if (version && versionFileInput) {
|
||||
core.warning('Both node-version and node-version-file are specified');
|
||||
core.warning(
|
||||
'Both node-version and node-version-file inputs are specified, only node-version will be used'
|
||||
);
|
||||
}
|
||||
|
||||
if (version) {
|
||||
|
@ -91,7 +93,9 @@ function resolveVersionInput(): string {
|
|||
versionFileInput
|
||||
);
|
||||
if (!fs.existsSync(versionFilePath)) {
|
||||
throw new Error('No specified file exists');
|
||||
throw new Error(
|
||||
`The specified node version file at: ${versionFilePath} does not exist`
|
||||
);
|
||||
}
|
||||
version = installer.parseNodeVersionFile(
|
||||
fs.readFileSync(versionFilePath, 'utf8')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue