Skip to content

Commit 2d309ff

Browse files
committed
fix var value test
1 parent e020716 commit 2d309ff

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/kernels/raw/launcher/kernelEnvVarsService.node.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ export class KernelEnvironmentVariablesService {
140140
// Keep a list of the kernelSpec variables that need to be substituted.
141141
const kernelSpecVariablesRequiringSubstitution: Record<string, string> = {};
142142
for (const [key, value] of Object.entries(kernelEnv || {})) {
143-
if (typeof value === 'string' && substituteEnvVars(value, process.env) !== value) {
143+
// Detect placeholders regardless of current process.env; we'll resolve after merges.
144+
if (typeof value === 'string' && /\${[A-Za-z]\w*(?:[^}\w].*)?}/.test(value)) {
144145
kernelSpecVariablesRequiringSubstitution[key] = value;
145146
delete kernelEnv[key];
146147
}

0 commit comments

Comments
 (0)