fix(cli): restore PATH handling on Windows and fix PowerShell quoting (#785)
Co-Authored-By: Aaron Matthis <rapus95@users.noreply.github.com> Co-Authored-By: Letta <noreply@letta.com>
This commit is contained in:
@@ -54,8 +54,11 @@ export function getShellEnv(): NodeJS.ProcessEnv {
|
||||
// Add ripgrep bin directory to PATH if available
|
||||
const rgBinDir = getRipgrepBinDir();
|
||||
if (rgBinDir) {
|
||||
const currentPath = env.PATH || "";
|
||||
env.PATH = `${rgBinDir}${path.delimiter}${currentPath}`;
|
||||
// Windows uses "Path" (not "PATH"), and env vars are case-insensitive there.
|
||||
// Find the actual key to avoid clobbering the user's PATH.
|
||||
const pathKey =
|
||||
Object.keys(env).find((k) => k.toUpperCase() === "PATH") || "PATH";
|
||||
env[pathKey] = `${rgBinDir}${path.delimiter}${env[pathKey] || ""}`;
|
||||
}
|
||||
|
||||
// Add Letta context for skill scripts
|
||||
|
||||
Reference in New Issue
Block a user