Improve error message

pull/274/head
David Finol 2021-06-30 19:04:10 -05:00
parent 964b91185e
commit 3bab3191df
3 changed files with 3 additions and 3 deletions

2
dist/index.js vendored
View File

@ -2119,7 +2119,7 @@ class UnityVersioning {
static read(projectPath) {
const filePath = path_1.default.join(projectPath, 'ProjectSettings', 'ProjectVersion.txt');
if (!fs.existsSync(filePath)) {
throw new Error(`Project settings file not found at "${filePath}".`);
throw new Error(`Project settings file not found at "${filePath}". Have you correctly set the projectPath?`);
}
return UnityVersioning.parse(fs.readFileSync(filePath, 'utf8'));
}

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@ export default class UnityVersioning {
static read(projectPath) {
const filePath = path.join(projectPath, 'ProjectSettings', 'ProjectVersion.txt');
if (!fs.existsSync(filePath)) {
throw new Error(`Project settings file not found at "${filePath}".`);
throw new Error(`Project settings file not found at "${filePath}". Have you correctly set the projectPath?`);
}
return UnityVersioning.parse(fs.readFileSync(filePath, 'utf8'));
}