From de006377954e8b7902451be6553c9a263fae9ada Mon Sep 17 00:00:00 2001 From: Joel Cox Date: Sat, 22 Jan 2022 04:53:25 +1100 Subject: [PATCH] fix: keep all local environment variables --- src/use-lambda-env.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/use-lambda-env.ts b/src/use-lambda-env.ts index 0d3acef..8c3f57d 100644 --- a/src/use-lambda-env.ts +++ b/src/use-lambda-env.ts @@ -28,7 +28,10 @@ async function getLambdaEnv(functionName: string, region?: string): Promise { 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); }