mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-02 23:23:45 +00:00
feat(plugin): add shell.env hook for manipulating environment in tools and shell (#12012)
This commit is contained in:
@@ -1500,12 +1500,15 @@ NOTE: At any point in time through this workflow you should feel free to ask the
|
||||
const matchingInvocation = invocations[shellName] ?? invocations[""]
|
||||
const args = matchingInvocation?.args
|
||||
|
||||
const cwd = Instance.directory
|
||||
const shellEnv = await Plugin.trigger("shell.env", { cwd }, { env: {} })
|
||||
const proc = spawn(shell, args, {
|
||||
cwd: Instance.directory,
|
||||
cwd,
|
||||
detached: process.platform !== "win32",
|
||||
stdio: ["ignore", "pipe", "pipe"],
|
||||
env: {
|
||||
...process.env,
|
||||
...shellEnv.env,
|
||||
TERM: "dumb",
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user