Skip to content

fix: resolve false Go/gofmt not-installed warnings on Windows and unify tool detection#59

Open
Zireael wants to merge 1 commit into
cortexkit:mainfrom
Zireael:fix/windows-go-tool-detection
Open

fix: resolve false Go/gofmt not-installed warnings on Windows and unify tool detection#59
Zireael wants to merge 1 commit into
cortexkit:mainfrom
Zireael:fix/windows-go-tool-detection

Conversation

@Zireael
Copy link
Copy Markdown

@Zireael Zireael commented May 24, 2026

Replaces #58. Addresses reviewer feedback:

  1. Fixed AFT_DISABLE_WELL_KNOWN_LOOKUP env-var bypass on Windows — moved the test escape hatch above the cfg!(windows) branch in try_well_known_path_lookup so integration tests can suppress well-known-path lookup on all platforms.

  2. Fixed missing spaces in install_hint("go") strings — added trailing spaces before \ line-continuation characters to prevent concatenated words like "—ensure" and "uses/opt/homebrew/bin".

See discussion: #58 (comment)


Summary by cubic

Fixes false “Go/gofmt not installed” warnings on Windows by searching common install locations when PATH is incomplete. Also unifies tool detection across OSes and improves go install hints.

  • Bug Fixes

    • Windows: include well-known paths for go tools (C:\Go\bin, C:\Program Files\Go\bin, %USERPROFILE%.cargo\bin, %USERPROFILE%\go\bin) to avoid false missing go, gofmt, gopls warnings.
    • Honor AFT_DISABLE_WELL_KNOWN_LOOKUP before platform checks so tests can disable fallback lookup on all OSes.
    • Cleaned up install_hint("go") spacing and added a Windows-specific hint with common paths.
  • Refactors

    • Exposed resolve_tool_uncached as pub(crate) for tests.
    • Extracted well_known_windows_search_paths and try_well_known_path_lookup_in to make lookup behavior easier to test.

Written for commit bd54f5a. Summary will update on new commits. Review in cubic

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

Tip: cubic could auto-approve low-risk PRs like this, if it thinks it's safe to merge. Learn more

Re-trigger cubic

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.

1 participant