Skip to content

Fix mo update target path#1008

Merged
tw93 merged 1 commit into
tw93:mainfrom
M-Hassan-Raza:fix/update-installed-command-path
May 30, 2026
Merged

Fix mo update target path#1008
tw93 merged 1 commit into
tw93:mainfrom
M-Hassan-Raza:fix/update-installed-command-path

Conversation

@M-Hassan-Raza
Copy link
Copy Markdown
Contributor

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

@M-Hassan-Raza M-Hassan-Raza requested a review from tw93 as a code owner May 30, 2026 10:16
@tw93 tw93 merged commit 9392cfd into tw93:main May 30, 2026
9 checks passed
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.
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.

2 participants