Code review: fix bugs, test failures, and macOS compatibility issues#3
Draft
Code review: fix bugs, test failures, and macOS compatibility issues#3
Conversation
- Fix ((step++)) -> ((step += 1)) in all 12 install functions (was failing in set -e contexts when step=0) - Add LM Studio CLI PATH ($HOME/.cache/lm-studio/bin) to zsh_postload.zsh - Fix M9 bats test: check zsh_aliases.zsh instead of zsh_postload.zsh for git_clean_branches - Fix bootstrap.sh: add DEST preset check and TTY detection to support non-interactive use - Fix bootstrap.bats I1: use truly empty PATH instead of /usr/bin:/bin (on Ubuntu, /bin == /usr/bin) - Fix xargs -r macOS incompatibility in zsh_aliases.zsh (replace with explicit empty-check guard) - Fix git plugin clone idempotency in installZsh (check dir existence before cloning) - Fix ls glob in doctor.sh: use find instead to avoid errors when no logs exist Co-authored-by: noofreuuuh <1218742+noofreuuuh@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Review code and implement improvements
Code review: fix bugs, test failures, and macOS compatibility issues
Mar 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Review of the codebase identified several bugs causing test failures, a macOS incompatibility, and missing shell configuration. All 58 bats tests now pass (previously 18+ failing/hanging).
Bug Fixes
((step++))exit code trap — All 12installXxx()functions opened with((step++)). Whenstep=0, the post-increment evaluates to0, returning exit code1and aborting underset -e. Changed to((step += 1))acrossinstall_core.shandinstall_software.sh.xargs -rmacOS incompatibility (zsh_aliases.zsh) —-r/--no-run-if-emptyis GNU-only; not available on macOS. Replaced with an explicit[[ -n "$gone_branches" ]]guard.Non-idempotent plugin clones (
install_core.sh) —git cloneforzsh-syntax-highlighting,zsh-autosuggestions,k, andpowerlevel10khad no existence check, failing on reinstall. Added[ -d ... ] ||guards.ls globerror in doctor (doctor.sh) —ls "$LOG_DIR"/*.logexits non-zero and triggers word-splitting when no logs exist. Replaced withfind -maxdepth 1 -name "*.log".Missing Config
zsh_postload.zsh) — Added$HOME/.cache/lm-studio/bintoPATHso thelmsCLI is available after install.Test Fixes
M9 assertion wrong file (
zshrc_config.bats) —git_clean_branches()lives inzsh_aliases.zsh, notzsh_postload.zsh.bootstrap.batsI1 hanging —PATH="/usr/bin:/bin"doesn't exclude git on Ubuntu (where/bin → /usr/bin). Updated to use a truly empty temp directory asPATH.bootstrap.shnon-interactive support — Wrapped the directory prompt in[[ -z "${DEST:-}" ]](skip if preset) and[[ -t 0 ]](skip if no TTY), enabling both scripted use and test isolation.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.