Skip to content

fix(updater): ignore installer assets in default matcher#5774

Open
AtifChy wants to merge 1 commit into
wailsapp:masterfrom
AtifChy:fix/5773
Open

fix(updater): ignore installer assets in default matcher#5774
AtifChy wants to merge 1 commit into
wailsapp:masterfrom
AtifChy:fix/5773

Conversation

@AtifChy

@AtifChy AtifChy commented Jul 12, 2026

Copy link
Copy Markdown

Description

Binary created by wails3 package on windows (nsis) contains installer suffix. And with updater setup, the app pulls installer binary instead of actual executable. This causes the installer binary to replace actual application and you can't install the app in the same place anymore.

Fixes # (#5773 )

Type of change

Please select the option that is relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration using wails doctor.

  • Windows
  • macOS
  • Linux

If you checked Linux, please specify the distro and version.

Test Configuration

Wails v3.0.0-alpha2.117 › Wails Doctor

# System

┌─────────────────────────────────────────────────────────────────────┐
| Name              | Windows 10 Pro                                  |
| Version           | 2009 (Build: 26200)                             |
| ID                | 25H2                                            |
| Branding          | Windows 11 Pro                                  |
| Platform          | windows                                         |
| Architecture      | amd64                                           |
| Go WebView2Loader | true                                            |
| WebView2 Version  | 150.0.4078.65                                   |
| CPU               | AMD Ryzen 7 5800H with Radeon Graphics          |
| GPU               | NVIDIA GeForce RTX 3070 Laptop GPU (NVIDIA)     |
| Memory            | 16GB                                            |
└─────────────────────────────────────────────────────────────────────┘

# Build Environment

┌──────────────────────────────────────────────────────────────────────┐
| Wails CLI      | v3.0.0-alpha2.117                                   |
| Go Version     | go1.26.5                                            |
| -buildmode     | exe                                                 |
| -compiler      | gc                                                  |
| CGO_CFLAGS     |                                                     |
| CGO_CPPFLAGS   |                                                     |
| CGO_CXXFLAGS   |                                                     |
| CGO_ENABLED    | 1                                                   |
| CGO_LDFLAGS    |                                                     |
| DefaultGODEBUG | cryptocustomrand=1,tlssecpmlkem=0,urlstrictcolons=0 |
| GOAMD64        | v1                                                  |
| GOARCH         | amd64                                               |
| GOOS           | windows                                             |
└──────────────────────────────────────────────────────────────────────┘

# Dependencies

┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
| *Android SDK               | Not found. Set ANDROID_HOME (install via Android Studio or the command-line tools). |
| MSIX Packaging Tool        | 1.2024.405.0                                                                        |
| MakeAppx.exe (Windows SDK) | Not Installed                                                                       |
| NSIS                       | v3.12                                                                               |
| SignTool.exe (Windows SDK) | Not Installed                                                                       |
| npm                        | 11.17.0                                                                             |
| docker                     | *Docker version 29.5.3, build d1c06ef (daemon not running)                          |
|                                                                                                                  |
└──────────────────────────────────────────── * - Optional Dependency ─────────────────────────────────────────────┘

# Signing

┌─────────────────────────────────────────────┐
| macOS Signing   | Not configured            |
| Windows Signing | Not configured            |
| Linux Signing   | GPG key: 1E8CA68658BA3E8E |
└─────────────────────────────────────────────┘

# Checking for issues

 SUCCESS  No issues found

# Diagnosis

 SUCCESS  Your system is ready for Wails development!

Summary by CodeRabbit

  • Bug Fixes
    • Prevented installer packages from being selected as the primary download when matching GitHub release assets.
    • Improved Windows asset selection by excluding installer-only files from automatic matching.

@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The GitHub default asset matcher now ignores release assets whose filenames contain “installer.” Tests add a Windows installer artifact and verify that no primary asset is selected for Windows/amd64.

Changes

GitHub Installer Asset Filtering

Layer / File(s) Summary
Matcher heuristic and regression coverage
v3/pkg/updater/providers/github/github.go, v3/pkg/updater/providers/github/github_test.go
The default matcher skips installer assets, and tests verify that a Windows installer is not selected for windows/amd64.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related issues

Poem

A bunny bounds through release night,
Skipping installers from its flight.
Windows waits, but finds no prize,
The matcher checks with clever eyes.
Tests hop neatly, green and bright.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly describes the main change: skipping installer assets in the updater's default matcher.
Description check ✅ Passed The description includes the change summary, issue reference, change type, testing, and test configuration required by the template.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
v3/pkg/updater/providers/github/github_test.go (1)

301-301: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Exercise the original installer-versus-executable collision.

The current fixture proves that an installer-only Windows release returns -1, but it does not verify that a real executable is selected when the installer appears first. Add app-windows-amd64.exe after the installer and expect its index to ensure the original regression is covered.

Suggested test adjustment
 		{Name: "app-darwin-arm64.dmg.sig"},
 		{Name: "app-windows-amd64-installer.exe"},
+		{Name: "app-windows-amd64.exe"},
 	}
 ...
-		{"windows", "amd64", -1}, // windows installer skipped by matcher
+		{"windows", "amd64", 7}, // installer skipped; application selected

Also applies to: 312-312

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@v3/pkg/updater/providers/github/github_test.go` at line 301, Update the
GitHub provider test fixture around the Windows asset list to add
app-windows-amd64.exe after app-windows-amd64-installer.exe, and change the
expected result to that executable’s index. Preserve the installer-only case
expecting -1 so both behaviors are covered.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@v3/pkg/updater/providers/github/github_test.go`:
- Line 301: Update the GitHub provider test fixture around the Windows asset
list to add app-windows-amd64.exe after app-windows-amd64-installer.exe, and
change the expected result to that executable’s index. Preserve the
installer-only case expecting -1 so both behaviors are covered.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: acf8461c-b818-461b-bf0f-56ede598e7c5

📥 Commits

Reviewing files that changed from the base of the PR and between 3440ae5 and 307c562.

📒 Files selected for processing (2)
  • v3/pkg/updater/providers/github/github.go
  • v3/pkg/updater/providers/github/github_test.go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant