Fix version check of Godot binary (#592)

* Change default value for godotTools.editorPath.godot4 to "godot"

* Switch godot version check back to using --version
This commit is contained in:
David Kincaid
2024-02-21 14:31:32 -05:00
committed by GitHub
parent b0f7220f41
commit 436ff64d07
2 changed files with 3 additions and 3 deletions

View File

@@ -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" };