feat: add self reference for env variables

This commit is contained in:
Scai
2025-08-18 02:04:23 +03:00
parent 58b78e1ee3
commit 8cc054389a
2 changed files with 82 additions and 0 deletions

View File

@@ -273,6 +273,14 @@ export const prepareEnvironmentVariables = (
throw new Error(`Invalid project environment variable: project.${ref}`);
});
}
resolvedValue = resolvedValue.replace(/\$\{\{(.*?)\}\}/g, (_, ref) => {
if (serviceVars[ref] !== undefined) {
return serviceVars[ref];
}
throw new Error(`Invalid service environment variable: ${ref}`);
});
return `${key}=${resolvedValue}`;
});