mirror of
https://github.com/godotengine/godot-vscode-plugin.git
synced 2026-01-04 10:09:58 +03:00
Adjust Godot version detection regex (#526)
* Adjust Godot version detection regex Signed-off-by: mlsvrts <mlsvrts@protonmail.com>
This commit is contained in:
@@ -109,7 +109,7 @@ export class ServerController {
|
||||
try {
|
||||
log.info(`Verifying version of '${godotPath}'`);
|
||||
const output = execSync(`${godotPath} --version`).toString().trim();
|
||||
const pattern = /([34])\.([0-9]+)\.(?:[0-9]+\.)?\w+.\w+.[0-9a-f]{9}/;
|
||||
const pattern = /([34])\.([0-9]+)\.(?:[0-9]+\.)?(?:\w+\.)+[0-9a-f]{9}/;
|
||||
const match = output.match(pattern);
|
||||
if (!match) {
|
||||
const message = `Cannot launch debug session: '${settingName}' of '${godotPath}' is not a valid Godot executable`;
|
||||
|
||||
@@ -110,7 +110,7 @@ export class ServerController {
|
||||
try {
|
||||
log.info(`Verifying version of '${godotPath}'`);
|
||||
const output = execSync(`${godotPath} --version`).toString().trim();
|
||||
const pattern = /([34])\.([0-9]+)\.(?:[0-9]+\.)?\w+.\w+.[0-9a-f]{9}/;
|
||||
const pattern = /([34])\.([0-9]+)\.(?:[0-9]+\.)?(?:\w+\.)+[0-9a-f]{9}/;
|
||||
const match = output.match(pattern);
|
||||
if (!match) {
|
||||
const message = `Cannot launch debug session: '${settingName}' of '${godotPath}' is not a valid Godot executable`;
|
||||
|
||||
@@ -93,7 +93,7 @@ function open_workspace_with_editor() {
|
||||
|
||||
try {
|
||||
const output = execSync(`${godotPath} --version`).toString().trim();
|
||||
const pattern = /([34])\.([0-9]+)\.(?:[0-9]+\.)?\w+.\w+.[0-9a-f]{9}/;
|
||||
const pattern = /([34])\.([0-9]+)\.(?:[0-9]+\.)?(?:\w+\.)+[0-9a-f]{9}/;
|
||||
const match = output.match(pattern);
|
||||
if (!match) {
|
||||
const message = `Cannot launch Godot editor: '${settingName}' of '${godotPath}' is not a valid Godot executable`;
|
||||
|
||||
@@ -110,7 +110,7 @@ export class ClientConnectionManager {
|
||||
|
||||
try {
|
||||
const output = execSync(`${godotPath} --version`).toString().trim();
|
||||
const pattern = /([34])\.([0-9]+)\.(?:[0-9]+\.)?\w+.\w+.[0-9a-f]{9}/;
|
||||
const pattern = /([34])\.([0-9]+)\.(?:[0-9]+\.)?(?:\w+\.)+[0-9a-f]{9}/;
|
||||
const match = output.match(pattern);
|
||||
if (!match) {
|
||||
const message = `Cannot launch headless LSP: '${settingName}' of '${godotPath}' is not a valid Godot executable`;
|
||||
|
||||
Reference in New Issue
Block a user