{"record":{"id":"0785376204955f17","repo":"windmill-labs/windmill","slug":"warning-branch-name-currentbranch-contai","errorCode":null,"errorMessage":"⚠️  WARNING: Branch name \"${currentBranch}\" contains filesystem-unsafe characters (/ \\ : * ? \" < > | .).","messagePattern":"⚠️  WARNING: Branch name \"(.+?)\" contains filesystem-unsafe characters \\(/ \\\\ : \\* \\? \" < > \\| \\.\\)\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cli/src/core/conf.ts","lineNumber":485,"sourceCode":"        `Current Git branch '${currentBranch}' does not match any workspace in the configuration.\\n` +\n          `Available workspaces: ${availableInfo}`\n      );\n\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","sourceCodeStart":467,"sourceCodeEnd":503,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/src/core/conf.ts#L467-L503","documentation":"The first of two identical-text warnings in `validateBranchConfiguration`. When the current git branch contains filesystem-unsafe characters (`/ \\ : * ? \" < > | .`) and the CLI is about to interactively create a new empty workspace entry for that branch, it warns that the raw branch name is problematic for filenames. Branch-specific sync files embed the branch name, so such characters would break or confuse file paths on some filesystems.","triggerScenarios":"Running `wmill push`/`pull` in a git repo where the current branch (after workspace-fork resolution) matches no workspace, the user is in an interactive TTY and accepts the \"Create empty workspace configuration\" prompt, and the branch name matches `/[\\/\\\\:*?\"<>|.]/` — e.g. feature/xyz, release:v2, or a branch with a dot.","commonSituations":"Working on a feature branch like `feature/add-login` or `hotfix/1.2.3` in a repo whose `wmill.yaml` has no workspace entry for that branch; slash-containing branch names from Jira/GitHub conventions are the most frequent case.","solutions":["Accept the sanitization (CLI replaces unsafe chars with `_`); note the sanitized name shown in the follow-up warning.","Rename the branch to avoid unsafe characters, e.g. `git branch -m feature/add-login feature-add-login`.","Pre-create a workspace entry in `wmill.yaml` whose key/`gitBranch` matches the branch so the creation path is skipped.","Use `--workspace` to bypass branch auto-detection entirely."],"exampleFix":"// before\ngit checkout -b feature/add-login\n// after\ngit checkout -b feature-add-login","handlingStrategy":"validation","validationCode":"const branch = $(\"git branch --show-current\").trim();\nif (/[\\/\\\\:*?\"<>|.]/.test(branch)) {\n  console.warn(`Branch \"${branch}\" will be sanitized in wmill file names — consider renaming`);\n}","typeGuard":"const isFsSafeBranch = (b: string): boolean => !/[\\/\\\\:*?\"<>|.]/.test(b);","tryCatchPattern":null,"preventionTips":["Adopt a branch-naming convention using only letters, digits, `-` and `_`.","Replace `/` with `-` in feature branch names (`feature-add-login` not `feature/add-login`).","Avoid dots in branch names (e.g. use `v1-2` not `v1.2`).","Add a git hook that rejects filesystem-unsafe branch names."],"tags":["cli","git","filesystem","branch-naming"],"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"}