fix(apps): winget bootstrap never ran (unbalanced-brace parse error) — the real apps-skip cause #31

Merged
SilverLABS merged 1 commits from fix/winget-bootstrap-brace into main 2026-06-10 21:44:32 +00:00
Owner

The actual root cause (from appinstall.log on the VM)

The new diagnostic log nailed it:

InstallAsync: 11 app(s) requested: thunderbird, vlc, 7zip, libreoffice, vscodium, git, dotnet-sdk-9, …
winget probe (PATH): exit=-1
bootstrap-winget: exit=1 err=... Unexpected token '}' in expression or statement
winget UNAVAILABLE -> skipping all 11 app(s)

AppInstaller.ResolveWingetAsync built the bootstrap -Command from an interpolated string ($"…{{…}}"{/}) concatenated with a non-interpolated string whose }} stayed literal — so the emitted PowerShell ended in }} and failed to parse. The winget bootstrap never executed on any run, so winget was never installed and every app was skipped — regardless of network. This was the real, persistent blocker behind "apps didn't install."

Fix

Invoke the bootstrap script file directly (-File bootstrap-winget.ps1), which already self-checks for winget and installs it online. No inline if/else, no brace bug. Falls back to the inbox re-register only if the script is missing.

Confirmed from the same log: the Apps picker + seeding work (11 developer apps selected), the account is the real one (C:\Users\hhgfhgf, no sm-bootstrap), and the virtio NetKVM driver is now in the DriverStore. The next VM run's log will show whether the bootstrap then downloads winget successfully (i.e. whether the NIC has network) — isolating any remaining issue.

Test Plan

  • dotnet test … --filter AppInstaller 5/5 (existing bootstrap test still green — falls back when the script file is absent)
  • VM: appinstall.log shows bootstrap running + winget resolved → apps install

🤖 Generated with Claude Code

## The actual root cause (from `appinstall.log` on the VM) The new diagnostic log nailed it: ``` InstallAsync: 11 app(s) requested: thunderbird, vlc, 7zip, libreoffice, vscodium, git, dotnet-sdk-9, … winget probe (PATH): exit=-1 bootstrap-winget: exit=1 err=... Unexpected token '}' in expression or statement winget UNAVAILABLE -> skipping all 11 app(s) ``` `AppInstaller.ResolveWingetAsync` built the bootstrap `-Command` from an **interpolated** string (`$"…{{…}}"` → `{`/`}`) concatenated with a **non-interpolated** string whose `}}` stayed literal — so the emitted PowerShell ended in `}}` and failed to parse. **The winget bootstrap never executed on any run**, so winget was never installed and every app was skipped — regardless of network. This was the real, persistent blocker behind "apps didn't install." ## Fix Invoke the bootstrap **script file** directly (`-File bootstrap-winget.ps1`), which already self-checks for winget and installs it online. No inline if/else, no brace bug. Falls back to the inbox re-register only if the script is missing. Confirmed from the same log: the Apps picker + seeding work (11 developer apps selected), the account is the real one (`C:\Users\hhgfhgf`, no `sm-bootstrap`), and the virtio NetKVM driver **is now in the DriverStore**. The next VM run's log will show whether the bootstrap then downloads winget successfully (i.e. whether the NIC has network) — isolating any remaining issue. ## Test Plan - [x] `dotnet test … --filter AppInstaller` 5/5 (existing bootstrap test still green — falls back when the script file is absent) - [ ] VM: `appinstall.log` shows bootstrap running + winget resolved → apps install 🤖 Generated with [Claude Code](https://claude.com/claude-code)
SilverLABS added 1 commit 2026-06-10 21:44:21 +00:00
fix(apps): winget bootstrap never ran (unbalanced-brace parse error in inline cmd)
Some checks failed
Build SilverMetal Enhanced - Windows ISO / build (pull_request) Failing after 36s
e91c4de7ed
appinstall.log on the VM showed: bootstrap-winget exit=1 'Unexpected token }'. The
inline -Command was built from an interpolated string ($"...{{...}}" -> {/}) concatenated
with a NON-interpolated string whose '}}' stayed literal, so the emitted PowerShell ended
in '}}' and failed to parse -> the bootstrap (and thus winget install) never executed ->
all apps skipped on every run, regardless of network. Invoke the bootstrap .ps1 file
directly instead (it self-checks + installs winget online); fall back to the inbox
re-register only when the script is absent.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
SilverLABS merged commit d0a5925652 into main 2026-06-10 21:44:32 +00:00
SilverLABS deleted branch fix/winget-bootstrap-brace 2026-06-10 21:44:32 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SilverLABS/SilverMetal#31