windmill-labs/windmill · warning
⚠️ WARNING: Branch name "${currentBranch}" contains filesys
Error message
⚠️ WARNING: Branch name "${currentBranch}" contains filesystem-unsafe characters (/ \ : * ? " < > | .). What it means
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.
Source
Thrown at cli/src/core/conf.ts:485
`Current Git branch '${currentBranch}' does not match any workspace in the configuration.\n` +
`Available workspaces: ${availableInfo}`
);
const shouldCreate =
opts.yes ||
(await Confirm.prompt({
message: `Create empty workspace configuration for branch '${currentBranch}'?`,
default: true,
}));
if (shouldCreate) {
// Warn if branch name contains filesystem-unsafe characters
if (/[\/\\:*?"<>|.]/.test(currentBranch)) {
const sanitizedBranchName = currentBranch.replace(
/[\/\\:*?"<>|.]/g,
"_"
);
log.warn(
`⚠️ WARNING: Branch name "${currentBranch}" contains filesystem-unsafe characters (/ \\ : * ? " < > | .).`
);
log.warn(
` Branch-specific files will be saved with sanitized name: "${sanitizedBranchName}"`
);
log.warn(
` Example: "file.variable.yaml" → "file.${sanitizedBranchName}.variable.yaml"`
);
}
// Read current config, add workspace entry, and write it back
const currentConfig = await readConfigFile();
if (!currentConfig.workspaces) {
currentConfig.workspaces = {} as WorkspacesConfig;
}
(currentConfig.workspaces as any)[currentBranch] = {};
View on GitHub (pinned to e474e8803c)
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.
Example fix
// before git checkout -b feature/add-login // after git checkout -b feature-add-login
Defensive patterns
Strategy: validation
Validate before calling
const branch = $("git branch --show-current").trim();
if (/[\/\\:*?"<>|.]/.test(branch)) {
console.warn(`Branch "${branch}" will be sanitized in wmill file names — consider renaming`);
} Type guard
const isFsSafeBranch = (b: string): boolean => !/[\/\\:*?"<>|.]/.test(b);
Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Branch-specific files will be saved with sanitized name: "${
- Example: "file.variable.yaml" → "file.${sanitizedBranchName}
- File not found: ${filePath}
- Workspace folder not found, are you in the right directory?
- Directory not found: ${targetDirectory}
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/0785376204955f17.
Report an issue: GitHub.