Permalink
Browse files

fix(devserver): implement excludeEnv in dev server (closes #117)

  • Loading branch information...
lusentis committed Jun 25, 2017
1 parent 56156ca commit 3f075761df8b019089eb16d41e4060bd29cd732a
Showing with 6 additions and 3 deletions.
  1. +6 −3 src/commands/proxy.js
View
@@ -140,10 +140,13 @@ function apiCallback (res, runner, responseError, responseData) {
res.end();
}
function getEnvVariables (outputs) {
function getEnvVariables (outputs, excludeEnv = []) {
const envVariables = outputs.map(output => {
if (excludeEnv.includes(output.OutputKey)) {
return;
}
return `DAWSON_${output.OutputKey}=${output.OutputValue}`;
});
}).filter(Boolean);
return envVariables;
}
@@ -165,7 +168,7 @@ async function runDockerContainer (
log(` [STS] using cached credentials for Lambda '${runner.name}'`);
}
const credentials = credentialsCache.get(runner);
const envVariables = getEnvVariables(outputs);
const envVariables = getEnvVariables(outputs, runner.api.excludeEnv);
try {
log(`\n======= Log Fragment Begin for «${runner.name.bold}» =======`.dim);
const invokeResult = dockerLambda({

0 comments on commit 3f07576

Please sign in to comment.