mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-06-08 13:11:11 +00:00
fixed unit tests
This commit is contained in:
parent
c1c463274c
commit
243f7be265
3 changed files with 216 additions and 1393 deletions
|
@ -90,8 +90,8 @@ function resolveVersionInput(): string {
|
|||
process.env.GITHUB_WORKSPACE!,
|
||||
versionFileInput
|
||||
);
|
||||
if (!fs.existsSync(versionFilePath)) {
|
||||
throw new Error('No specified file exists');
|
||||
if (fs.existsSync(versionFilePath) === false) {
|
||||
throw new Error('The specified node version file does not exist');
|
||||
}
|
||||
version = installer.parseNodeVersionFile(
|
||||
fs.readFileSync(versionFilePath, 'utf8')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue