From 03cdfe544ca7dedc596be445e15bbb42ab9ee0de Mon Sep 17 00:00:00 2001 From: Inkvi Date: Mon, 4 Nov 2024 14:47:14 -0800 Subject: [PATCH] Fix environment variable handling by preserving placeholders for missing values --- src/utils/ibc-processor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/ibc-processor.ts b/src/utils/ibc-processor.ts index 1b7fe23..36e434b 100644 --- a/src/utils/ibc-processor.ts +++ b/src/utils/ibc-processor.ts @@ -42,7 +42,7 @@ export function IbcProcessor(processorName?: string) { try { const fileContents = fs.readFileSync(configPath, 'utf8') const interpolatedFileContents = fileContents.replace(/\$\{([A-Z0-9_]+)}/g, (match, p1) => { - return process.env[p1] || match; // Replace with env var value, or keep the placeholder if not found + return process.env[p1] !== undefined ? String(process.env[p1]) : match; // Replace with env var value (even if empty), or keep the placeholder if not found }); const interpolatedConfig = yaml.load(interpolatedFileContents) as Record config = ConfigSchema.parse(interpolatedConfig)