mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-05-19 12:54:45 +00:00
refactor: volta check
This commit is contained in:
parent
5a01179c35
commit
57cec77d94
3 changed files with 4 additions and 29 deletions
|
@ -505,7 +505,7 @@ export function parseNodeVersionFile(contents: string): string {
|
|||
// Try parsing the file as an NPM `package.json`
|
||||
// file.
|
||||
nodeVersion = JSON.parse(contents).engines?.node;
|
||||
|
||||
if (!nodeVersion) JSON.parse(contents).volta?.node;
|
||||
if (!nodeVersion) throw new Error();
|
||||
} catch (err) {
|
||||
// In the case of an unknown format,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue