Repository navigation
fix: create the login shell's config file, and test every shell's install path in CI - #19
Conversation
Since the config writes were guarded by `[ -f ... ]` (#5), a shell with no config file got no PATH entry and no hook, and the installer still told the user to `source` that file, which failed. That is the default on macOS: zsh is the login shell and there is no ~/.zshrc. The Homebrew path (#6) also skipped creating config.fish, which only the manual path did, so a fish user who installed through brew got no hook either. Before either path runs, the login shell's config file ($SHELL: ~/.zshrc or ~/.bashrc) is created when missing, and config.fish whenever fish is installed, as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014EpZRbbdpnwmwxMATVJtHM
…stall path - The bash jobs had no install step, so install.bash never ran and the verify step failed on the missing bash-preexec.sh. They now run it from bash. - Each install step sets $SHELL to its shell, as for a user whose login shell it is (the runner's is bash), so the installer handles that shell's config. - The setup step is gone: it made a ~/.zsh directory rather than ~/.zshrc and seeded config files users may not have. The macOS runner has no ~/.zshrc, like a fresh account. - Verify checks what each path really installs. macOS (Homebrew): the cask is installed, both binaries are linked into brew's bin and nothing in ~/.shelltime/bin shadows them. Linux (manual): both binaries are in ~/.shelltime/bin and the config puts it on PATH. Both: every hook and bash-preexec.sh, the daemon dir, and the login shell's config sourcing its hook. Then a new interactive shell must load the hook's functions and run that shelltime. The old bash check sourced ~/.bashrc non-interactively, where Ubuntu's default ~/.bashrc returns before the shelltime lines, so it passed either way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014EpZRbbdpnwmwxMATVJtHM
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
☁️ Claude Code cloud · Fix shell installation test matrix and installer behaviorFixed the shell installation workflow so each matrix job runs the installer under its intended shell and verifies the correct configuration.
7.5M tokens: 81 input · 45.7K output · 7.3M cache read · 169.3K cache write 📝 AI summaryUpdated Adjusted View this session on ShellTime → Updated 2026-11-11 15:28 UTC by ShellTime · totals for the whole session so far · the session page is visible to its owner |
Shell Installation Testhas failed onmainon every run since at least #14, always intest-shells. In run 67, five of its six jobs failed. Two failures were workflow bugs and two were install bugs.Why each job failed
bash-preexec.sh not foundinstall.bashnever ranzsh:source:1: no such file or directory: ~/.zshrcmkdir -p ~/.zsh(a directory), not~/.zshrc. Install:install.bashonly writes to an existing~/.zshrc~/.zshrc, just like a fresh Mac, so the hook is never sourcedsource: ... config.fish: No such file or directoryconfig.fishwas only created on the manual path. The Homebrew path (#6) skipped itThe zsh failure is a real user bug. Reproduced on Linux: run as a zsh user (
SHELL=zsh) with no~/.zshrc, the installer writes no PATH line and no hook, then printsreload this one: source ~/.zshrc, and that command fails. It came in with the[ -f ... ]guards in #5, and it is the default case on macOS.The old bash check was also hollow.
bash -c "source ~/.bashrc"runs non-interactively, where Ubuntu's default~/.bashrcreturns before the shelltime lines, so it passed whether or not the hook worked.Changes
install.bash: before either install path runs, it creates the login shell's config file ($SHELL:~/.zshrcor~/.bashrc) if it is missing. It still createsconfig.fishwhenever fish is installed, but now on the Homebrew path too.test.yaml:bash ./install.bashfrom its shell with$SHELLset to that shell (the runner's own login shell is bash).brew list --cask shelltime, both binaries linked in brew's bin, and no~/.shelltime/bin/shelltimeshadowing them.~/.shelltime/bin, and the config puts that folder on PATH.bash-preexec.shexist,~/.shelltime/daemonexists, and the login shell's config sources its hook.shelltimeto the expected binary.No check was dropped:
bash-preexec.shis still required on both paths, and the~/.shelltime/bincheck now applies only to the manual path, which is the only one that writes there.CLAUDE.md: the testing section now describes these checks.Testing
On Linux, I extracted the workflow's own install and verify scripts and ran them for zsh, bash and fish, each in a fresh HOME. All three pass. Negative cases, each failing with its own message:
install.bashwith zsh:~/.zshrc was not createdsourceline:does not source the <shell> hook404: Not Found):a new <shell> shell did not load the hook~/.bashrcpasses withbash -i;bash -cdoes not load the hook.The macOS (Homebrew) jobs could not be run locally. This PR's CI run is their test.
Generated by Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.