Modern Docker Management, Designed for Everyone
Go composecontainer-managementcontainersdockerdocker-composedocker-managementgoself-hostedsveltekittypescriptweb-ui
fix: allow dots and hyphens in .env variable names (#4199)
DominikZublasing144d7acced1b
diff --git a/frontend/src/lib/components/code-editor/analysis/env-analysis.ts b/frontend/src/lib/components/code-editor/analysis/env-analysis.tsindex 700b174f6..05c158db4 100644--- a/frontend/src/lib/components/code-editor/analysis/env-analysis.ts+++ b/frontend/src/lib/components/code-editor/analysis/env-analysis.ts@@ -2,7 +2,8 @@ import type { Diagnostic } from '@codemirror/lint';import type { AnalysisResult, EditorContext, OutlineItem } from './types';import { hasClosingQuote, isOpenQuote } from './parse-env-utils';-const ENV_KEY_REGEX = /^[A-Za-z_][A-Za-z0-9_]*$/;+// Compose passes dotted and hyphenated names (e.g. .NET config keys) through to containers unchanged.+const ENV_KEY_REGEX = /^[A-Za-z_][A-Za-z0-9_.-]*$/;type ParsedEnvLine = {lineNumber: number;@@ -34,7 +35,7 @@ function parseEnvLine(line: string, lineNumber: number, from: number, diagnosticfrom: keyFrom,to: keyTo,severity: 'error',- message: `Invalid variable name "${key}". Use letters, numbers and underscore only.`+ message: `Invalid variable name "${key}". Use letters, numbers, underscores, dots and hyphens only.`});return null;}