diff --git a/package.json b/package.json index 6a41880..fe4426d 100644 --- a/package.json +++ b/package.json @@ -230,7 +230,7 @@ }, "godotTools.editorPath.godot4": { "type": "string", - "default": "godot4", + "default": "godot", "description": "Path to the Godot 4 editor executable" }, "godotTools.editor.verbose": { diff --git a/src/utils/project_utils.ts b/src/utils/project_utils.ts index dd1c18f..a54da1e 100644 --- a/src/utils/project_utils.ts +++ b/src/utils/project_utils.ts @@ -95,8 +95,8 @@ type VERIFY_RESULT = { export function verify_godot_version(godotPath: string, expectedVersion: "3" | "4" | string): VERIFY_RESULT { try { - const output = execSync(`"${godotPath}" -h`).toString().trim(); - const pattern = /^Godot Engine v(([34])\.([0-9]+)(?:\.[0-9]+)?)/m; + const output = execSync(`"${godotPath}" --version`).toString().trim(); + const pattern = /^(([34])\.([0-9]+)(?:\.[0-9]+)?)/m; const match = output.match(pattern); if (!match) { return { status: "INVALID_EXE" };