{"record":{"id":"9031c7d63850c0c2","repo":"windmill-labs/windmill","slug":"example-file-variable-yaml-file-sanitizedb","errorCode":null,"errorMessage":"Example: \"file.variable.yaml\" → \"file.${sanitizedBranchName}.variable.yaml\"","messagePattern":"Example: \"file\\.variable\\.yaml\" → \"file\\.(.+?)\\.variable\\.yaml\"","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cli/src/core/conf.ts","lineNumber":491,"sourceCode":"        (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(\n          `✅ Created empty workspace configuration for '${currentBranch}'`\n        );\n      } else {","sourceCodeStart":473,"sourceCodeEnd":509,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/src/core/conf.ts#L473-L509","documentation":"The third line of the same sanitization advisory from `validateBranchConfiguration`. It shows a concrete example of the transformation: a branch-specific file such as `file.variable.yaml` will be stored as `file.<sanitizedBranchName>.variable.yaml`. Purely informational, helping developers predict where their branch-specific files will land on disk.","triggerScenarios":"Identical trigger path: interactive create-workspace prompt accepted for an unmatched branch whose name matches `/[\\/\\\\:*?\"<>|.]/`, producing the example string with `sanitizedBranchName` interpolated.","commonSituations":"Developers on dotted branches like `v1.0` or slashed branches like `feat/ui` wanting to know the on-disk naming convention for variables/resources/scripts tied to that branch.","solutions":["Use the shown example to locate branch-specific files (search for `file.<sanitized>.variable.yaml`).","Rename the branch to avoid sanitization if the file names matter to your tooling.","Pre-define the workspace entry in `wmill.yaml` to control naming yourself."],"exampleFix":"// before: branch \"feat/login\" → file.feat_login.variable.yaml\n// after: branch \"feat-login\" → file.feat-login.variable.yaml","handlingStrategy":"fallback","validationCode":"const branch = $(\"git branch --show-current\").trim();\nconst sanitized = branch.replace(/[\\/\\\\:*?\"<>|.]/g, \"_\");\nconsole.log(`Expect branch-specific files like file.${sanitized}.variable.yaml`);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Generate expected file-name patterns from the sanitized branch when scripting around sync output.","Use a branch naming scheme without unsafe chars so file names match branch names 1:1.","Document the `file.<branch>.<type>.yaml` convention in the repo README."],"tags":["cli","git","filesystem","naming-convention"],"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"}