From 216d18b3c428ed50147ea10a90400d99af0cd052 Mon Sep 17 00:00:00 2001 From: Sanaei Date: Sun, 2 Aug 2026 12:40:11 +0200 Subject: [PATCH] chore(vscode): fix Linux paths in the task and launch configs The "go: build" task hardcoded bin/3x-ui.exe, so building on Linux produced a binary carrying a Windows extension. It now emits bin/3x-ui and keeps the .exe name behind a windows override. The Postgres launch config prepended C:\Program Files\PostgreSQL\18\bin to PATH on every platform. Linux separates entries with ':', not ';', so that string fused into the first real PATH entry and clobbered it. Moved it into a windows block, which is where the pg_dump/pg_restore lookups in ServerService need it anyway. --- .vscode/launch.json | 15 ++++++++++++--- .vscode/tasks.json | 10 +++++++++- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index ea3f71f3c..04fa00cea 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -29,10 +29,19 @@ "XUI_LOG_FOLDER": "x-ui", "XUI_BIN_FOLDER": "x-ui", "XUI_DB_TYPE": "postgres", - "XUI_DB_DSN": "postgres://xui:xuipass@127.0.0.1:5432/xui?sslmode=disable", - "PATH": "C:\\Program Files\\PostgreSQL\\18\\bin;${env:PATH}" + "XUI_DB_DSN": "postgres://xui:xuipass@127.0.0.1:5432/xui?sslmode=disable" + }, + "windows": { + "env": { + "XUI_DEBUG": "true", + "XUI_LOG_FOLDER": "x-ui", + "XUI_BIN_FOLDER": "x-ui", + "XUI_DB_TYPE": "postgres", + "XUI_DB_DSN": "postgres://xui:xuipass@127.0.0.1:5432/xui?sslmode=disable", + "PATH": "C:\\Program Files\\PostgreSQL\\18\\bin;${env:PATH}" + } }, "console": "integratedTerminal" - }, + } ] } \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index ed103ab0c..1f6dfc388 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -8,9 +8,17 @@ "args": [ "build", "-o", - "bin/3x-ui.exe", + "bin/3x-ui", "./main.go" ], + "windows": { + "args": [ + "build", + "-o", + "bin/3x-ui.exe", + "./main.go" + ] + }, "options": { "cwd": "${workspaceFolder}" },