Skip to content

Make the setup safer when a swap, install or repair fails - #56

Merged
nunreasonable merged 6 commits into
mainfrom
installer-fixes
Nov 9, 2026
Merged

nunreasonable merged 6 commits into
mainfrom
installer-fixes

Conversation

@nunreasonable

Copy link
Copy Markdown
Owner

Six setup fixes, one per commit.

  • Rollback keeps the old files. Swap::rollback deleted the previous program files even when some of them couldn't go back. It now keeps that folder when anything failed and says where it is: in the error when the swap itself fails, and as a note when the config step fails after the swap.
  • An unreadable manifest stops the install. It used to count as "not installed", so the install ran as a fresh one and deleted the whole folder on any failure. The preflight now shows it as an error with the path. A failed install only deletes the folder when it was missing or empty before the install started, so a cancelled extraction no longer takes an existing install (or its wallpaper backup) with it.
  • Repair puts the settings back. If moving the JSON files fails halfway, or the file swap fails or is cancelled, the moved files are copied back from the backup before the error is returned. If that copy fails, a note says where the backup is.
  • PATH before winget list. The terminal tools and FFmpeg are looked up on the PATH first; winget list only runs when they aren't there.
  • No endless wait on subprocess output. win::run read stdout and stderr with join(), which waited forever when a child process kept the pipes open. The readers now send their output through a channel, and run waits at most 3 s for each once the process has exited.
  • Time limit for download bodies. In ureq 3 the body timeout is one budget for the whole body, so each download gets one sized to the file: 10 minutes plus the size at 16 KiB/s. Small requests get 120 s.

New strings are in installer/ui/i18n.js in English and Portuguese. fsops:: is now part of the setup-tests filter.

Tested with cargo test -p iiw-setup-core on Linux, and on a Windows 10 VM with the Windows test binary (fsops:: ops:: win:: release::, 25 passed) and the built setup:

  • a reinstall with a locked file in the install folder failed with "in use" and left all files in place;
  • a fresh install over a folder without a manifest, cancelled during extraction, changed nothing;
  • a broken manifest shows the error in the checks and disables Install;
  • a full reinstall afterwards worked.

Copilot AI balanced review requested due to automatic review settings November 8, 2026 23:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@nunreasonable nunreasonable changed the title Setup: safer rollback, fresh installs, repair and timeouts Make the setup safer when a swap, install or repair fails Nov 8, 2026
@nunreasonable
nunreasonable merged commit 4609422 into main Nov 9, 2026
7 checks passed
@nunreasonable
nunreasonable deleted the installer-fixes branch November 14, 2026 11:36
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