{"record":{"id":"4ec8bb6c301b8ab8","repo":"golangci/golangci-lint","slug":"move-golangci-lint-binary-w","errorCode":null,"errorMessage":"move golangci-lint binary: %w","messagePattern":"move golangci-lint binary: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/commands/internal/builder.go","lineNumber":85,"sourceCode":"\terr = b.goModTidy(ctx)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"go mod tidy: %w\", err)\n\t}\n\n\tb.log.Infof(\"Building golangci-lint binary\")\n\n\tbinaryName := b.getBinaryName()\n\n\terr = b.goBuild(ctx, binaryName)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"build golangci-lint binary: %w\", err)\n\t}\n\n\tb.log.Infof(\"Moving golangci-lint binary\")\n\n\terr = b.copyBinary(binaryName)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"move golangci-lint binary: %w\", err)\n\t}\n\n\treturn nil\n}\n\nfunc (b Builder) clone(ctx context.Context) error {\n\t//nolint:gosec // the variable is sanitized.\n\tcmd := exec.CommandContext(ctx,\n\t\t\"git\", \"clone\", \"--branch\", sanitizeVersion(b.cfg.Version),\n\t\t\"--single-branch\", \"--depth\", \"1\", \"-c\", \"advice.detachedHead=false\", \"-q\",\n\t\t\"https://github.com/golangci/golangci-lint.git\",\n\t)\n\tcmd.Dir = b.root\n\tcmd.Env = filterGitEnviron(os.Environ())\n\n\toutput, err := cmd.CombinedOutput()\n\tif err != nil {\n\t\tb.log.Infof(\"%s\", string(output))","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/golangci/golangci-lint/blob/ed7a235d2d771152056fdc142a9855567c5796a9/pkg/commands/internal/builder.go#L67-L103","documentation":"Wrapping error in Builder.Build: copyBinary failed to move the freshly compiled golangci-lint binary from the build directory to its final location. Usually a filesystem problem — destination not writable, missing directory, or cross-device move — rather than a build issue.","triggerScenarios":"Thrown at pkg/commands/internal/builder.go:85 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check write permissions on the destination path","Ensure the destination directory exists","Check available disk space","Verify no process is locking the destination file"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ed7a235d2d771152056fdc142a9855567c5796a9","analyzedAt":"2026-09-02T18:47:33.865Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}