Skip to content

Commit

Permalink
fix: keep all local environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
joelcox22 committed Jan 21, 2022
1 parent e8d14d0 commit de00637
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/use-lambda-env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ async function getLambdaEnv(functionName: string, region?: string): Promise<Node
export async function useLambdaEnv(functionName: string, command: string[], region?: string): Promise<never> {
const result = cp.spawnSync(command[0], command.slice(1), {
stdio: 'inherit',
env: await getLambdaEnv(functionName, region),
env: {
...process.env,
...(await getLambdaEnv(functionName, region)),
},
});
process.exit(result.status ?? 1);
}
Expand Down

0 comments on commit de00637

Please sign in to comment.