fix(railpack): update environment variable handling to include quotes for consistency

This commit is contained in:
Mauricio Siu 2025-04-12 02:16:39 -06:00
parent ee6ad07c0a
commit 37f9e073f0

View File

@ -84,7 +84,7 @@ export const buildRailpack = async (
for (const envVar of envVariables) { for (const envVar of envVariables) {
const [key, value] = envVar.split("="); const [key, value] = envVar.split("=");
if (key && value) { if (key && value) {
buildArgs.push("--secret", `id=${key},env=${key}`); buildArgs.push("--secret", `id=${key},env='${key}'`);
env[key] = value; env[key] = value;
} }
} }
@ -132,7 +132,7 @@ export const getRailpackCommand = (
]; ];
for (const env of envVariables) { for (const env of envVariables) {
prepareArgs.push("--env", env); prepareArgs.push("--env", `'${env}'`);
} }
// Calculate secrets hash for layer invalidation // Calculate secrets hash for layer invalidation
@ -164,7 +164,7 @@ export const getRailpackCommand = (
for (const envVar of envVariables) { for (const envVar of envVariables) {
const [key, value] = envVar.split("="); const [key, value] = envVar.split("=");
if (key && value) { if (key && value) {
buildArgs.push("--secret", `id=${key},env=${key}`); buildArgs.push("--secret", `id=${key},env='${key}'`);
exportEnvs.push(`export ${key}=${value}`); exportEnvs.push(`export ${key}=${value}`);
} }
} }