cli improvements

This commit is contained in:
Ruben Fiszel
2026-01-15 23:01:38 +00:00
parent b3b0d3f5b6
commit 670e2a1a87
+2 -8
View File
@@ -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");