fix(cli): prevent duplicate 'Using non-dotted paths' log message

Add a flag to track whether the message has already been logged,
so it only prints once even if setNonDottedPaths is called multiple times.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Ruben Fiszel
2026-01-16 18:50:04 +00:00
co-authored by Claude Opus 4.5
parent cf44c7a7ee
commit 7e1f116c1f
+3 -1
View File
@@ -34,6 +34,7 @@ export type FolderSuffixes =
// Global state for nonDottedPaths configuration
let _nonDottedPaths = false;
let _nonDottedPathsLogged = false;
/**
* Set whether to use non-dotted paths (__flow, __app, __raw_app)
@@ -41,8 +42,9 @@ let _nonDottedPaths = false;
* This should be called once at startup based on wmill.yaml configuration.
*/
export function setNonDottedPaths(value: boolean): void {
if (value) {
if (value && !_nonDottedPathsLogged) {
log.info("Using non-dotted paths (__flow, __app, __raw_app)");
_nonDottedPathsLogged = true;
}
_nonDottedPaths = value;
}