mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-20 04:30:17 +09:00
fix: env not work
This commit is contained in:
parent
c89e4883b2
commit
e440ff56c8
@ -15,7 +15,14 @@ export async function createClient(
|
|||||||
const transport = new StdioClientTransport({
|
const transport = new StdioClientTransport({
|
||||||
command: config.command,
|
command: config.command,
|
||||||
args: config.args,
|
args: config.args,
|
||||||
env: config.env,
|
env: {
|
||||||
|
...Object.fromEntries(
|
||||||
|
Object.entries(process.env)
|
||||||
|
.filter(([_, v]) => v !== undefined)
|
||||||
|
.map(([k, v]) => [k, v as string]),
|
||||||
|
),
|
||||||
|
...(config.env || {}),
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const client = new Client(
|
const client = new Client(
|
||||||
|
Loading…
Reference in New Issue
Block a user