Skip to content

Guard oh-my-zsh source with directory existence check#87

Merged
jangroth merged 1 commit into
mainfrom
auto/issue-74-guard-omz-source
May 17, 2026
Merged

Guard oh-my-zsh source with directory existence check#87
jangroth merged 1 commit into
mainfrom
auto/issue-74-guard-omz-source

Conversation

@jangroth

Copy link
Copy Markdown
Owner

Summary

  • source $ZSH/oh-my-zsh.sh at files/zsh/zshrc:15 had no existence guard.
  • On a fresh clone before make install, $ZSH (~/.oh-my-zsh) does not exist yet, so every interactive shell opened immediately fails fatally.
  • Fix: wrap with [ -d "$ZSH" ] && source "$ZSH/oh-my-zsh.sh", consistent with the defensive pattern already used throughout the file.

Test plan

  • On a machine with oh-my-zsh installed: verify interactive shell still loads normally
  • On a fresh clone before make install: verify opening a shell no longer fails
  • Run make lint — no new failures vs. baseline

Closes #74


Generated by Claude Code

On a fresh clone before `make install`, $ZSH (~/.oh-my-zsh) does not
exist yet. The bare `source` caused every interactive shell to fail
fatally. Wrapping with `[ -d "$ZSH" ]` makes the shell usable even
before oh-my-zsh is installed.

Closes #74
@jangroth jangroth merged commit e1da6ff into main May 17, 2026
@jangroth jangroth deleted the auto/issue-74-guard-omz-source branch May 17, 2026 07:02
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.

Guard oh-my-zsh source in zshrc with existence check

2 participants