windmill-labs/windmill · warning

Branch-specific files will be saved with sanitized name: "${

Error message

Branch-specific files will be saved with sanitized name: "${sanitizedBranchName}"

What it means

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.

Source

Thrown at cli/src/core/conf.ts:488

      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] = {};

        await writeFile("wmill.yaml", yamlStringify(currentConfig), "utf-8");

        log.info(

View on GitHub (pinned to e474e8803c)

Solutions

  1. Note the sanitized name and confirm it does not collide with another branch's sanitized name.
  2. Rename the branch without the unsafe characters if you want raw branch names in files.
  3. Explicitly configure the workspace entry in `wmill.yaml` yourself with the desired key name.

Example fix

// before: branch "release/1.2"
// CLI uses sanitized name "release_1_2" in files like file.release_1_2.variable.yaml
// after: branch "release-1-2" avoids sanitization entirely
Defensive patterns

Strategy: fallback

Validate before calling

const branch = $("git branch --show-current").trim();
const sanitized = branch.replace(/[\/\\:*?"<>|.]/g, "_");
if (sanitized !== branch) console.log(`Branch-specific files will use "${sanitized}"`);

Prevention

When it happens

Trigger: 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.

Common situations: 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`.

Related errors


AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03). Data as JSON: /api/errors/58aeac5ec1b37ed7. Report an issue: GitHub.