{"record":{"id":"beb6eb5f23c56098","repo":"windmill-labs/windmill","slug":"wmill-yaml-found-in-parent-directory-relati","errorCode":null,"errorMessage":"⚠️  wmill.yaml found in parent directory: ${relativePath}","messagePattern":"⚠️  wmill\\.yaml found in parent directory: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/src/core/conf.ts","lineNumber":187,"sourceCode":"\n    // Check if we've reached the filesystem root\n    const parentDir = dirname(currentDir);\n    if (parentDir === currentDir) {\n      break;\n    }\n\n    currentDir = parentDir;\n  }\n\n  // If wmill.yaml was found in a parent directory, warn the user and change working directory\n  if (\n    !GLOBAL_CONFIG_OPT.noCdToRoot &&\n    foundPath &&\n    resolve(dirname(foundPath)) !== resolve(startDir)\n  ) {\n    const configDir = dirname(foundPath);\n    const relativePath = relative(startDir, foundPath);\n    log.warn(`⚠️  wmill.yaml found in parent directory: ${relativePath}`);\n\n    // Change working directory to where wmill.yaml was found\n    process.chdir(configDir);\n    log.info(`📁 Changed working directory to: ${configDir}`);\n  }\n\n  return foundPath;\n}\n\nexport function getWmillYamlPath(): string | null {\n  return findWmillYaml();\n}\n\nlet legacyConfigWarned = false;\n\nexport async function readConfigFile(opts?: { warnIfMissing?: boolean }): Promise<SyncOptions> {\n  const warnIfMissing = opts?.warnIfMissing ?? true;\n  try {","sourceCodeStart":169,"sourceCodeEnd":205,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/src/core/conf.ts#L169-L205","documentation":"Config-discovery notice in findWmillYaml: no wmill.yaml exists in the current directory, but one was found in an ancestor directory. Unless disabled via noCdToRoot, the CLI warns and changes the working directory to that config root so sync operations run against the intended workspace root.","triggerScenarios":"Thrown at cli/src/core/conf.ts:187 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run commands from the directory containing wmill.yaml to make behavior explicit","Set noCdToRoot (GLOBAL_CONFIG_OPT) to keep the current working directory","Move/duplicate wmill.yaml into the current directory if it should be its own workspace"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}