Skip to content

Commit 40b4dfb

Browse files
committed
use runner env gather helper
1 parent 060bbc1 commit 40b4dfb

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

packages/cli-v3/src/entryPoints/managed-run-controller.ts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@ class ManagedRunController {
898898
) satisfies TaskRunExecutionMetrics;
899899

900900
const taskRunEnv = {
901-
...gatherProcessEnv(),
901+
...env.gatherProcessEnv(),
902902
...envVars,
903903
};
904904

@@ -1580,19 +1580,6 @@ const workerManifest = await loadWorkerManifest();
15801580
const prodWorker = new ManagedRunController({ workerManifest });
15811581
await prodWorker.start();
15821582

1583-
function gatherProcessEnv(): Record<string, string> {
1584-
const $env = {
1585-
NODE_ENV: stdEnv.NODE_ENV,
1586-
NODE_EXTRA_CA_CERTS: stdEnv.NODE_EXTRA_CA_CERTS,
1587-
OTEL_EXPORTER_OTLP_ENDPOINT: stdEnv.OTEL_EXPORTER_OTLP_ENDPOINT,
1588-
};
1589-
1590-
// Filter out undefined values
1591-
return Object.fromEntries(
1592-
Object.entries($env).filter(([key, value]) => value !== undefined)
1593-
) as Record<string, string>;
1594-
}
1595-
15961583
async function loadWorkerManifest() {
15971584
const manifest = await readJSONFile("./index.json");
15981585
return WorkerManifest.parse(manifest);

0 commit comments

Comments
 (0)