Skip to content

Commit

Permalink
chore: add NODE_ENV to environment when exec-ing SDK server
Browse files Browse the repository at this point in the history
Signed-off-by: Donnie Adams <[email protected]>
  • Loading branch information
thedadams committed Aug 26, 2024
1 parent 317e645 commit 5c40945
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gptscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ export class GPTScript {
if (GPTScript.instanceCount === 1 && process.env.GPTSCRIPT_DISABLE_SERVER !== "true") {
let env = process.env
if (this.opts.Env) {
env = {}
env = {
"NODE_ENV": process.env.NODE_ENV
}
for (const v of this.opts.Env) {
const equalIndex = v.indexOf("=")
if (equalIndex === -1) {
Expand Down

0 comments on commit 5c40945

Please sign in to comment.