mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
fix[railpack]: environment variable validation for empty strings
Allow empty string values to be processed as valid environment variables by checking for existence rather than non-empty length.
This commit is contained in:
parent
9535276fe6
commit
7f9c19bc11
@ -86,7 +86,7 @@ export const buildRailpack = async (
|
||||
const env: { [key: string]: string } = {};
|
||||
for (const pair of envVariables) {
|
||||
const [key, value] = parseEnvironmentKeyValuePair(pair);
|
||||
if (key && value.length > 0) {
|
||||
if (key && value) {
|
||||
buildArgs.push("--secret", `id=${key},env=${key}`);
|
||||
env[key] = value;
|
||||
}
|
||||
@ -166,7 +166,7 @@ export const getRailpackCommand = (
|
||||
const exportEnvs = [];
|
||||
for (const pair of envVariables) {
|
||||
const [key, value] = parseEnvironmentKeyValuePair(pair);
|
||||
if (key && value.length > 0) {
|
||||
if (key && value) {
|
||||
buildArgs.push("--secret", `id=${key},env=${key}`);
|
||||
exportEnvs.push(`export ${key}='${value}'`);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user