fix(preflight): asset mode retries a move that fails, names the cause and rolls back (#197)
A part of the stack that will not move from the unpack folder into place is retried for about 30 seconds; each retry removes what reached the target and unpacks the entry afresh from the archive, so the entry ends up there once and whole. If it still fails, both scripts take back everything they moved and exit 1 with the system's message and "nothing was installed". New test hook CHEMENU_PREFLIGHT_MOVE_FAIL=<entry>:<n>[:partial]. Files changed: - CHANGES.md - INSTALL.md - VERSION - instructions/preflight.md - tools/CONTRACT.md - tools/chemenu/tests/conftest.py - tools/chemenu/tests/test_preflight.py - tools/chemenu/tests/test_preflight_pwsh.py - tools/preflight.ps1 - tools/preflight.sh Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SnAJ7Z3CpVD3PRbN73QtU2
This commit is contained in:
1 parent
5915b07383
commit
5c9be38aa8
10 files changed
+379
-47
No files matched your search
@@ -118,6 +118,13 @@ It is safe to run at any time: a second run on a ready checkout changes nothing
|
||||
- A checksum that does not match, a failed download, and a copy of the script that carries no
|
||||
download address (it was not taken from a release) exit 1 with nothing unpacked; report the
|
||||
message, and do not fetch the tarball by another route.
|
||||
- A part of the stack that will not move from the unpack folder into place - on Windows a
|
||||
virus scanner can hold a freshly unpacked file open for a moment - is retried for about 30
|
||||
seconds. If it still fails, the script takes back everything it moved and exits 1 with
|
||||
"nothing was installed" and the system's message. Report that message; the folder is as it
|
||||
was, and the user may run the script again. If the message instead names entries it could
|
||||
not take back, the folder is no longer empty: whether to empty it (keeping `.git`) is the
|
||||
user's decision, as above - do not delete anything yourself.
|
||||
- On POSIX, `curl`, `tar` and `sha256sum` (or `shasum`) have to exist; when one does not, the
|
||||
script stops with exit 42 like any other missing tool. The PowerShell script needs nothing
|
||||
beyond what Windows ships.
|
||||
|
||||
Reference in new issue
Block a user