{"record":{"id":"58aeac5ec1b37ed7","repo":"windmill-labs/windmill","slug":"branch-specific-files-will-be-saved-with-sanitized","errorCode":null,"errorMessage":"Branch-specific files will be saved with sanitized name: \"${sanitizedBranchName}\"","messagePattern":"Branch-specific files will be saved with sanitized name: \"(.+?)\"","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cli/src/core/conf.ts","lineNumber":488,"sourceCode":"\n      const shouldCreate =\n        opts.yes ||\n        (await Confirm.prompt({\n          message: `Create empty workspace configuration for branch '${currentBranch}'?`,\n          default: true,\n        }));\n\n      if (shouldCreate) {\n        // Warn if branch name contains filesystem-unsafe characters\n        if (/[\\/\\\\:*?\"<>|.]/.test(currentBranch)) {\n          const sanitizedBranchName = currentBranch.replace(\n            /[\\/\\\\:*?\"<>|.]/g,\n            \"_\"\n          );\n          log.warn(\n            `⚠️  WARNING: Branch name \"${currentBranch}\" contains filesystem-unsafe characters (/ \\\\ : * ? \" < > | .).`\n          );\n          log.warn(\n            `   Branch-specific files will be saved with sanitized name: \"${sanitizedBranchName}\"`\n          );\n          log.warn(\n            `   Example: \"file.variable.yaml\" → \"file.${sanitizedBranchName}.variable.yaml\"`\n          );\n        }\n\n        // Read current config, add workspace entry, and write it back\n        const currentConfig = await readConfigFile();\n\n        if (!currentConfig.workspaces) {\n          currentConfig.workspaces = {} as WorkspacesConfig;\n        }\n        (currentConfig.workspaces as any)[currentBranch] = {};\n\n        await writeFile(\"wmill.yaml\", yamlStringify(currentConfig), \"utf-8\");\n\n        log.info(","sourceCodeStart":470,"sourceCodeEnd":506,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/src/core/conf.ts#L470-L506","documentation":"This is the second line of the branch-name sanitization advisory emitted by `validateBranchConfiguration` (interactive workspace-creation path). It tells the developer the exact sanitized name the CLI will use for branch-specific files: every character matching `/[\\/\\\\:*?\"<>|.]/` is replaced with `_`. It is informational; the CLI is not failing, just disclosing the filename transformation.","triggerScenarios":"Same conditions as the preceding warning: unmatched current branch with filesystem-unsafe characters, interactive prompt accepted, and the CLI computing `currentBranch.replace(/[\\/\\\\:*?\"<>|.]/g, \"_\")` before writing the workspace entry.","commonSituations":"A developer on `feature/JIRA-123.fix` accepts the create-workspace prompt and sees the branch will be stored as `feature_JIRA-123_fix` in generated file names like `file.<branch>.variable.yaml`.","solutions":["Note the sanitized name and confirm it does not collide with another branch's sanitized name.","Rename the branch without the unsafe characters if you want raw branch names in files.","Explicitly configure the workspace entry in `wmill.yaml` yourself with the desired key name."],"exampleFix":"// before: branch \"release/1.2\"\n// CLI uses sanitized name \"release_1_2\" in files like file.release_1_2.variable.yaml\n// after: branch \"release-1-2\" avoids sanitization entirely","handlingStrategy":"fallback","validationCode":"const branch = $(\"git branch --show-current\").trim();\nconst sanitized = branch.replace(/[\\/\\\\:*?\"<>|.]/g, \"_\");\nif (sanitized !== branch) console.log(`Branch-specific files will use \"${sanitized}\"`);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Record the sanitized-name rule (`unsafe char → _`) in team docs so file names are predictable.","Check for two branches that sanitize to the same string — they would collide on file names.","Prefer renaming the branch over living with sanitized names when tooling greps by file name."],"tags":["cli","git","filesystem","sanitization"],"backgroundTag":"unsafe-characters-in-filename","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"}