Improve error message
parent
964b91185e
commit
3bab3191df
|
|
@ -2119,7 +2119,7 @@ class UnityVersioning {
|
||||||
static read(projectPath) {
|
static read(projectPath) {
|
||||||
const filePath = path_1.default.join(projectPath, 'ProjectSettings', 'ProjectVersion.txt');
|
const filePath = path_1.default.join(projectPath, 'ProjectSettings', 'ProjectVersion.txt');
|
||||||
if (!fs.existsSync(filePath)) {
|
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'));
|
return UnityVersioning.parse(fs.readFileSync(filePath, 'utf8'));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -16,7 +16,7 @@ export default class UnityVersioning {
|
||||||
static read(projectPath) {
|
static read(projectPath) {
|
||||||
const filePath = path.join(projectPath, 'ProjectSettings', 'ProjectVersion.txt');
|
const filePath = path.join(projectPath, 'ProjectSettings', 'ProjectVersion.txt');
|
||||||
if (!fs.existsSync(filePath)) {
|
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'));
|
return UnityVersioning.parse(fs.readFileSync(filePath, 'utf8'));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue