Skip to content

fix: harden zsh migration patterns + graceful apt fallback#29

Merged
alohays merged 1 commit into
mainfrom
fix/migration-and-apt-graceful
Mar 23, 2026
Merged

fix: harden zsh migration patterns + graceful apt fallback#29
alohays merged 1 commit into
mainfrom
fix/migration-and-apt-graceful

Conversation

@alohays
Copy link
Copy Markdown
Owner

@alohays alohays commented Mar 23, 2026

Summary

  • migrate_zsh.py: Add 7 line patterns + 2 block patterns to catch antidote remnants that survived initial migration (source "$ANTIDOTE_BUNDLE", local _ANTIDOTE_SAVING, _antidote_compile_bundles, fpath workaround, empty prezto if-block, $? error-recovery block)
  • packages.sh: Pre-filter apt packages with apt-cache show before batch install. apt-get aborts entirely if any package is missing from repos (--ignore-missing only handles download failures, not missing repo packages). Now skips unavailable packages with a warning.
  • tests: 7 new test cases for all missed patterns (27 total sanitize tests, 45 total)

Context

dotfiles --yolo update on Ubuntu 22.04 (jammy) had two failures:

  1. zsh startup errors from antidote code surviving migration
  2. apt-get install aborting entirely because git-delta and eza aren't in jammy repos

Test plan

  • All 45 unit tests pass (python3 -m unittest tests.test_dotfiles_apply -v)
  • zsh -i -c 'echo ok' starts without antidote errors after cleaning local.zsh.zsh
  • dotfiles packages --set agents,visual installs available packages and warns about missing ones

🤖 Generated with Claude Code

migrate_zsh.py: add 7 line patterns and 2 block patterns to catch
antidote remnants that survived the initial migration — source
"$ANTIDOTE_BUNDLE" (variable ref without .zsh suffix), local antidote
vars, bare _antidote_ function calls, fpath workaround, empty prezto
if-block, and $? error-recovery block.

packages.sh: pre-filter apt packages with apt-cache show before
installing. apt-get aborts entirely if any package is missing from
repos (--ignore-missing only handles download failures). Now skips
unavailable packages with a warning and installs the rest.

Closes the zsh startup errors and apt failures seen on Ubuntu 22.04
(jammy) where git-delta and eza are not in default repos.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@alohays alohays merged commit 37b46ba into main Mar 23, 2026
2 checks passed
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.

1 participant