fix: preserve orchestration launcher compatibility

This commit is contained in:
Affaan Mustafa
2026-03-12 15:40:25 -07:00
parent c5b8a0783e
commit 2d43541f0e
5 changed files with 37 additions and 24 deletions

View File

@@ -293,11 +293,12 @@ function readPlanString(config, key, absoluteTarget) {
return undefined;
}
if (typeof value !== 'string' || value.trim().length === 0) {
throw new Error(`Invalid orchestration plan: ${key} must be a non-empty string (${absoluteTarget})`);
if (typeof value !== 'string') {
throw new Error(`Invalid orchestration plan: ${key} must be a string when provided (${absoluteTarget})`);
}
return value.trim();
const normalized = value.trim();
return normalized.length > 0 ? normalized : undefined;
}
function resolveSnapshotTarget(targetPath, cwd = process.cwd()) {

View File

@@ -39,7 +39,7 @@ function buildTemplateVariables(values) {
const stringValue = String(value);
const quotedValue = shellQuote(stringValue);
accumulator[key] = quotedValue;
accumulator[key] = stringValue;
accumulator[`${key}_raw`] = stringValue;
accumulator[`${key}_sh`] = quotedValue;
return accumulator;