Skip to content

fix(init): make init tests shell-independent and verify embedded scripts#150

Merged
mroth merged 1 commit intomainfrom
mroth/fix-148
Mar 2, 2026
Merged

fix(init): make init tests shell-independent and verify embedded scripts#150
mroth merged 1 commit intomainfrom
mroth/fix-148

Conversation

@mroth
Copy link
Owner

@mroth mroth commented Feb 27, 2026

A few tests previously inherited the host's $SHELL via defaultShellType(), causing failures on non-bash shells. Now all three failing tests explicitly pass --shell= and cover both bash and fish, asserting against the actual embedded script content instead of a fragment.

Fixes #148 (see the issue for discussion).
Supersedes #149.

(I may be asking for trouble trying to use Claude to fix this issue after it created it to begin with, but I specifically told it how I wanted this problem fixed, and I verified output seems reasonable-ish, so I'm down for the experience).

Tests previously inherited the host's $SHELL via defaultShellType(), causing
failures on non-bash shells. Now all three tests explicitly pass --shell= and
cover both bash and fish, asserting against the actual embedded script content.

Fixes #148

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mroth
Copy link
Owner Author

mroth commented Feb 27, 2026

cc @jamielinux

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates init command tests to be deterministic across developer environments by avoiding reliance on the host $SHELL, and strengthens assertions by matching against the embedded script content.

Changes:

  • Refactors init tests to pass --shell= explicitly (bash + fish coverage) instead of relying on defaultShellType().
  • Updates assertions to check for inclusion of the full embedded script strings (status shortcuts, git wrapper, aliases) rather than smaller fragments.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mroth mroth merged commit 3354886 into main Mar 2, 2026
21 checks passed
@mroth mroth deleted the mroth/fix-148 branch March 2, 2026 15:16
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.

Tests fail if the shell is Fish (or presumably anything except Bash)

2 participants