mirror of
https://github.com/godotengine/godot-vscode-plugin.git
synced 2026-01-04 10:09:58 +03:00
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:
@@ -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" };
|
||||
|
||||
Reference in New Issue
Block a user