Skip to content

Commit bff2df8

Browse files
check project
1 parent 9a3f0d6 commit bff2df8

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/cli.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,11 @@ program.command('run')
376376
if (projectPath && projectPath.length > 0) {
377377
unityProject = await UnityProject.GetProject(projectPath);
378378

379+
if (!unityProject) {
380+
Logger.instance.error(`The specified path is not a valid Unity project: ${projectPath}. Use --unity-project or UNITY_PROJECT_PATH environment variable.`);
381+
process.exit(1);
382+
}
383+
379384
if (!unityEditor) {
380385
const unityHub = new UnityHub();
381386
unityEditor = await unityHub.GetEditor(unityProject.version);

0 commit comments

Comments
 (0)