From 670e2a1a879eec3c5960a8fa30050faa454534d8 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Thu, 15 Jan 2026 23:01:38 +0000 Subject: [PATCH] cli improvements --- cli/src/core/conf.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/cli/src/core/conf.ts b/cli/src/core/conf.ts index 3fe388c45e..d2edc8569c 100644 --- a/cli/src/core/conf.ts +++ b/cli/src/core/conf.ts @@ -125,18 +125,12 @@ export const GLOBAL_CONFIG_OPT = { noCdToRoot: false }; function findWmillYaml(): string | null { const startDir = resolve(Deno.cwd()); const isInGitRepo = isGitRepository(); + const gitRoot = isInGitRepo ? getGitRepoRoot() : null; - // If not in git repo, only check current directory - if (!isInGitRepo) { - const wmillYamlPath = join(startDir, "wmill.yaml"); - return existsSync(wmillYamlPath) ? wmillYamlPath : null; - } - - // If in git repo, search up to git repository root - const gitRoot = getGitRepoRoot(); let currentDir = startDir; let foundPath: string | null = null; + // Search upward for wmill.yaml until we find it, reach git root, or reach filesystem root while (true) { const wmillYamlPath = join(currentDir, "wmill.yaml");