fix(apps): winget bootstrap never ran (unbalanced-brace parse error) — the real apps-skip cause #31
Reference in New Issue
Block a user
Delete Branch "fix/winget-bootstrap-brace"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The actual root cause (from
appinstall.logon the VM)The new diagnostic log nailed it:
AppInstaller.ResolveWingetAsyncbuilt the bootstrap-Commandfrom 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, nosm-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 AppInstaller5/5 (existing bootstrap test still green — falls back when the script file is absent)appinstall.logshows bootstrap running + winget resolved → apps install🤖 Generated with Claude Code
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>