fixed unit tests

This commit is contained in:
La'Kaleigh Harris 2021-11-02 20:55:05 +00:00 committed by GitHub
parent c1c463274c
commit 243f7be265
3 changed files with 216 additions and 1393 deletions

View file

@ -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')