{"record":{"id":"adaa29aa77819d77","repo":"vectordotdev/vector","slug":"already-exists-delete-it-or-move-it-aside-and-re-run","errorCode":null,"errorMessage":"{} already exists. Delete it (or move it aside) and re-run.","messagePattern":"(.+?) already exists\\. Delete it \\(or move it aside\\) and re-run\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"vdev/src/commands/release/generate_cue.rs","lineNumber":78,"sourceCode":"\n    let last_version = git::latest_release_version()?;\n\n    validate_single_bump(&last_version, new_version)?;\n    let new_version = new_version.clone();\n\n    // Capture today's date ONCE so the highlights filename and its frontmatter can never\n    // disagree if the run crosses UTC midnight.\n    let today = Utc::now().format(\"%Y-%m-%d\").to_string();\n\n    let cue_path = repo_root\n        .join(RELEASES_DIR)\n        .join(format!(\"{new_version}.cue\"));\n    let highlights_path = repo_root\n        .join(HIGHLIGHTS_DIR)\n        .join(upgrade_guide_filename(&today, &new_version));\n\n    if cue_path.exists() {\n        bail!(\n            \"{} already exists. Delete it (or move it aside) and re-run.\",\n            cue_path.display()\n        );\n    }\n    let stub_path = repo_root\n        .join(\"website\")\n        .join(\"content\")\n        .join(\"en\")\n        .join(\"releases\")\n        .join(format!(\"{new_version}.md\"));\n    if stub_path.exists() {\n        bail!(\n            \"{} already exists. Delete it (or move it aside) and re-run.\",\n            stub_path.display()\n        );\n    }\n    // Note: the highlights collision is checked later, only if we're actually going to\n    // write it — so a manually-authored upgrade guide doesn't block a release with no","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/vectordotdev/vector/blob/0d4ab78a4f0d9c9e5d03a50108a2ae4d2f4b2460/vdev/src/commands/release/generate_cue.rs#L60-L96","documentation":"The `vdev release generate-cue` command refuses to overwrite an existing release CUE file (`<version>.cue`) in the repository. This is a safety guard so a re-run never clobbers previously generated release data. The user must explicitly delete or move the existing file before regenerating.","triggerScenarios":"Running `vdev release generate-cue` when the target file `repo_root/<...>/<new_version>.cue` already exists on disk (checked via `cue_path.exists()` in `run`).","commonSituations":"Re-running the release command after a failed or partial run that already wrote the CUE file; generating a release for a version that was previously released; regenerating to pick up fragment changes without cleaning up the old output.","solutions":["Delete or rename the existing CUE file shown in the message (e.g. `mv <path> <path>.bak`), then re-run the command.","If the existing file is already correct, skip regeneration — the content you want may already be in place.","Verify the version argument is correct; you may be accidentally targeting an already-released version."],"exampleFix":"// before: re-run fails because output exists\nvdev release generate-cue 0.46.0\n// after\nmv website/cue/releases/0.46.0.cue website/cue/releases/0.46.0.cue.bak\nvdev release generate-cue 0.46.0","handlingStrategy":"validation","validationCode":"if test -e website/cue/releases/<version>.cue; then echo 'delete or move it aside first'; exit 1; fi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run release generation on a clean branch with no prior artifacts for the target version.","Check `git status` for leftover release files before regenerating.","Keep generated release artifacts out of the working tree until finalized."],"tags":["cli","release-tooling","file-conflict"],"backgroundTag":"file-already-exists","analyzedSha":"0d4ab78a4f0d9c9e5d03a50108a2ae4d2f4b2460","analyzedAt":"2026-09-16T02:53:35.741Z","contentChangedAt":"2026-09-16T02:53:35.741Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}