fix: 恢复本地 Convex Auth 链路
- 修复 desktop 脚本在 Linux 下优先使用后端虚拟环境可执行文件 - 移除 Convex Auth 的本地密钥兜底,回到真实 deployment env - 首页未登录时先跳转 /auth,避免根路由直接触发 workspace 初始化失败
This commit is contained in:
@@ -22,7 +22,33 @@ const path = require("path");
|
||||
const rootDir = path.resolve(__dirname, "..");
|
||||
const backendDir = path.join(rootDir, "wolai-backend");
|
||||
|
||||
const pythonBin = process.env.PYTHON_BIN || "python";
|
||||
function resolveBackendPython() {
|
||||
const fromEnv = (process.env.PYTHON_BIN || "").trim();
|
||||
if (fromEnv) return fromEnv;
|
||||
|
||||
const isWin = process.platform === "win32";
|
||||
const candidates = isWin
|
||||
? [
|
||||
path.join(backendDir, ".venv", "Scripts", "python.exe"),
|
||||
path.join(backendDir, ".venv312", "Scripts", "python.exe"),
|
||||
path.join(backendDir, "venv", "Scripts", "python.exe"),
|
||||
]
|
||||
: [
|
||||
path.join(backendDir, ".venv-linux", "bin", "python"),
|
||||
path.join(backendDir, ".venv", "bin", "python"),
|
||||
path.join(backendDir, "venv", "bin", "python"),
|
||||
];
|
||||
|
||||
for (const candidate of candidates) {
|
||||
if (fs.existsSync(candidate)) {
|
||||
return candidate;
|
||||
}
|
||||
}
|
||||
|
||||
return "python";
|
||||
}
|
||||
|
||||
const pythonBin = resolveBackendPython();
|
||||
const dataDir = process.env.MNOTE_DATA_DIR || path.join(rootDir, "data-desktop-test");
|
||||
|
||||
const backendCmd =
|
||||
|
||||
Reference in New Issue
Block a user