Add doctor diagnostic command for bootstrap failure investigation#9
Draft
Add doctor diagnostic command for bootstrap failure investigation#9
doctor diagnostic command for bootstrap failure investigation#9Conversation
Copilot
AI
changed the title
[WIP] Discuss implementation direction with users
Discussion: Align on approach before implementation
Mar 16, 2026
Copilot
AI
changed the title
Discussion: Align on approach before implementation
Fix wh not recognized during bootstrap by hardening alias definitions in aliases.ps1
Mar 16, 2026
…bootstrap failure $alias:tp/$alias:sc can throw terminating errors when dot-sourced under $ErrorActionPreference="Stop" (set by install/scoop.ps1), aborting before wh function is defined. Set-Alias with -Force -ErrorAction SilentlyContinue is resilient regardless of caller's ErrorActionPreference. Co-authored-by: ycookiey <70356861+ycookiey@users.noreply.github.com>
Copilot
AI
changed the title
Fix wh not recognized during bootstrap by hardening alias definitions in aliases.ps1
Fix wh not recognized during bootstrap by hardening alias definitions
Mar 16, 2026
Add bin/doctor.ps1 that tests whether $alias: syntax fails under $ErrorActionPreference="Stop", checks for alias conflicts, verifies aliases.ps1 dot-sourcing, and checks bootstrap dependencies. Also fix extra whitespace in aliases.ps1 line 1. Co-authored-by: ycookiey <70356861+ycookiey@users.noreply.github.com>
Copilot
AI
changed the title
Fix wh not recognized during bootstrap by hardening alias definitions
Add Mar 16, 2026
doctor diagnostic command for bootstrap failure investigation
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.
User asked whether we can locally verify that the
$alias:syntax under$ErrorActionPreference="Stop"is the actual root cause of thewh not recognizedbootstrap failure.Changes
bin/doctor.ps1— diagnostic script that spawns isolatedpwshsubprocesses to:$alias:tp = 'Test-Path'under$ErrorActionPreference="Stop"(reproduces the failure condition)tp/scaliases.ps1under Stop mode and verify all helpers (wh,mkd,mkl,isadmin,tp,sc) are definedpwsh,git,scoop,cargo)cli/definitions.toml— registerdoctoras a[[script]]sodotcli generateexposes it as a shell functionpwsh/aliases.ps1— fix stray double-space on line 1Example output
On environments where the issue doesn't reproduce, the first check passes with a note to check for alias conflicts manually.
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.