Skip to content

fix: fix bin path in windows#232

Merged
hardfist merged 1 commit intomainfrom
fix-bin-path
Aug 11, 2025
Merged

fix: fix bin path in windows#232
hardfist merged 1 commit intomainfrom
fix-bin-path

Conversation

@hardfist
Copy link
Copy Markdown
Contributor

@hardfist hardfist commented Aug 11, 2025

\"bin/rslint$(go env GOEXE)\" have compatible problems in windows and go compiler will auto add .exe for bin in windows if we don't specify bin name

Copilot AI review requested due to automatic review settings August 11, 2025 17:06
@hardfist hardfist changed the title fix: fix bin path fix: fix bin path in windows Aug 11, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes compatibility issues with the Go binary build process on Windows by simplifying the output path specification. The change removes the explicit executable extension handling and lets the Go compiler automatically determine the correct binary name and extension for the target platform.

  • Simplified Go build output path from explicit binary naming to directory-only specification
  • Removed manual $(go env GOEXE) extension handling that was causing Windows compatibility issues

Comment on lines +15 to +16
"build:bin": "go build -v -o bin/ ../../cmd/rslint",
"build:debug": "GOEXPERIMENT=noregabi go build -v -gcflags='all=-N -l' -o bin/ ../../cmd/rslint ",
Copy link

Copilot AI Aug 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The output path 'bin/' relies on Go's default binary naming. Consider verifying that other parts of the codebase that reference the binary (like VS Code extension or CLI wrappers) can correctly locate the binary with its platform-specific name (e.g., 'rslint' on Unix, 'rslint.exe' on Windows).

Suggested change
"build:bin": "go build -v -o bin/ ../../cmd/rslint",
"build:debug": "GOEXPERIMENT=noregabi go build -v -gcflags='all=-N -l' -o bin/ ../../cmd/rslint ",
"build:bin": "if [ \"$(uname -s | grep -i 'mingw\\|cygwin\\|msys')\" ]; then go build -v -o bin/rslint.exe ../../cmd/rslint; else go build -v -o bin/rslint ../../cmd/rslint; fi",
"build:debug": "if [ \"$(uname -s | grep -i 'mingw\\|cygwin\\|msys')\" ]; then GOEXPERIMENT=noregabi go build -v -gcflags='all=-N -l' -o bin/rslint.exe ../../cmd/rslint; else GOEXPERIMENT=noregabi go build -v -gcflags='all=-N -l' -o bin/rslint ../../cmd/rslint; fi",

Copilot uses AI. Check for mistakes.
@hardfist hardfist merged commit 3ebafd3 into main Aug 11, 2025
3 checks passed
@hardfist hardfist deleted the fix-bin-path branch August 11, 2025 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants