mirror of
https://github.com/actions/setup-node.git
synced 2025-12-15 01:01:38 +08:00
fixed unit tests
This commit is contained in:
committed by
GitHub
parent
c1c463274c
commit
243f7be265
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user