Fix mo update target path#1008
Merged
Merged
Conversation
tw93
pushed a commit
that referenced
this pull request
May 30, 2026
resolve_mole_source_path already returns non-zero on an empty result, so the wrapper added in #1008 duplicated it. Use resolve_mole_source_path directly and let is_homebrew_install return its match result as the final command. No behavior change; tests/update.bats still passes.
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.
Fix mo update so manual installs update the invoked Mole path, not another mole earlier in PATH.
It now resolves the invoked script path before download/install work. Homebrew installs still stay on brew update/upgrade.
Verified:
./scripts/check.sh --format
MOLE_TEST_NO_AUTH=1 bats tests/update.bats
./scripts/check.sh
MOLE_TEST_NO_AUTH=1 ./scripts/test.sh tests/update.bats tests/cli.bats