Skip to content

Auto-installation of golangci-lint (v2) fails on Windows due to missing .exe extension #3777

Closed
@KurosawaAngel

Description

@KurosawaAngel

What version of Go, VS Code & VS Code Go extension are you using?

Version Information
  • Run go version to get version of Go from the VS Code integrated terminal.
    • go version go1.24.4 windows/amd64
  • Run gopls -v version to get version of Gopls from the VS Code integrated terminal.
    • golang.org/x/tools/gopls v0.19.0-pre.2
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders.
    • 1.100.3
  • Check your installed extensions to get the version of the VS Code Go extension
    • 0.47.3

Share the Go related settings you have added/edited

"go.lintTool": "golangci-lint-v2",
    "go.lintFlags": [
        "--path-mode=abs",
        "--fast-only"
    ],
"go.formatTool": "custom",
"go.alternateTools": {
        "customFormatter": "golangci-lint-v2"
    },
"go.formatFlags": [
        "fmt",
        "--stdin"
    ]

Describe the bug

The automatic installation of golangci-lint when selecting the golangci-lint-v2 lint tool doesn't work correctly on Windows. The installer fails to recognize that the executable file should have a .exe extension, resulting in an error when attempting to move golangci-lint from the temp directory.

2025-06-07 00:04:05.244 [info] Installing github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest (golangci-lint-v2) SUCCEEDED
2025-06-07 00:04:05.245 [info] install missing tools failed - {"errno":-4058,"code":"ENOENT","syscall":"copyfile","path":"C:\\Users\\User\\go\\bin\\tmp\\golangci-lint","dest":"C:\\Users\\User\\go\\bin\\golangci-lint-v2"}

Expected Behavior:
The installer should properly handle Windows executables by either:

  • Automatically adding the .exe extension when moving the file
  • Correctly identifying the executable file with its proper extension

Steps to reproduce the behavior:

  1. Set golangci-lint-v2 as lint tool
  2. VS Code will try install golangci-lint
  3. Get an error during installation

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions