Skip to content

fix: skip a shell tool's init when the tool cannot start - #156

Merged
zaccesss merged 1 commit into
mainfrom
fix/skip-tool-init-when-it-cannot-start
Nov 18, 2026
Merged

zaccesss merged 1 commit into
mainfrom
fix/skip-tool-init-when-it-cannot-start

Conversation

@zaccesss

@zaccesss zaccesss commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

_cachedInit now runs the tool inside a try. If the tool cannot start, nothing is cached and no init script is returned. The shell then opens with the plain prompt or without z. The next start tries again. Both callers already skip a missing init script.

Smart App Control can refuse to start an unsigned tool (zoxide from winget is one). That is a terminating error, so it printed at the top of every new PowerShell window until the tool was allowed.

Checked in pwsh 7: a broken binary returns nothing with no error printed, while the real zoxide still builds its init script.

Closes #157

@zaccesss zaccesss added bug Something isn't working windows Windows-specific labels Nov 18, 2026
@zaccesss
zaccesss merged commit 684b43a into main Nov 18, 2026
42 checks passed
@zaccesss
zaccesss deleted the fix/skip-tool-init-when-it-cannot-start branch November 18, 2026 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working windows Windows-specific

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PowerShell prints an error when a shell tool cannot start

1 participant