Ensure Dotfiles Robustness and Idempotency #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Dotfiles Robustness & Idempotency Improvements
This PR significantly improves the robustness, safety, and idempotency of the dotfiles bootstrap process and related setup scripts. The changes address common pitfalls in dotfile management and onboarding, making setup faster, safer, and more reliable for both fresh installs and repeated runs.
Closes https://app.latchloop.com/tasks/0e9d9459-48c6-436a-aacd-a71fbe0fcf8d
Key Changes
init_dotfiles.shset -euo pipefailfor strict error handling.$HOME/.dotfiles.ln -sfnto safely overwrite existing symlinks..baksuffix.pushd/popd; script can run from any directory.git submodule update --init --recursivefor robust submodule setup.osx/setup.rb/etc/shells.NONINTERACTIVE=1).brewis in PATH before runningbrew bundle.python3 -m pip install ...instead ofpip3.asdf exec gem install ...for Ruby gems.zimfw installafter downloadingzimfw.zsh.mixcommands.--forcefor non-interactive hex and Phoenix installer.Testing & Verification
To verify these changes:
osx/setup.rb./etc/shells..bakfiles are only created if real files exist.init_dotfiles.shfor linting.brew bundle checkto validate Brewfile.Additional Notes