fix: clarify system-install doctor alias and shim path checks

Use UserBinDir for PATH checks and pass aliases as not required under
system install without treating that as active interception.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Sahilb315
2026-07-13 15:37:02 +05:30
co-authored by Cursor
parent ffd0e7e759
commit 8d1a4b60e1
3 changed files with 39 additions and 18 deletions
+11 -2
View File
@@ -13,11 +13,20 @@ func TestPathContainsDir(t *testing.T) {
assert.False(t, pathContainsDir([]string{"/usr/bin"}, ""))
}
func TestSystemShimsWithoutPathDoNotActivateInterception(t *testing.T) {
func TestSystemInstallAliasesPassDoesNotActivateInterception(t *testing.T) {
results := []doctor.CheckResult{
{Name: checkShellAliases, Status: doctor.StatusWarn},
{Name: checkShellAliases, Status: doctor.StatusPass, Message: "No aliases (system install)"},
{Name: checkShimInPath, Status: doctor.StatusFail},
}
assert.False(t, isInterceptionActive(results))
}
func TestAliasesInstalledActivatesInterception(t *testing.T) {
results := []doctor.CheckResult{
{Name: checkShellAliases, Status: doctor.StatusPass, Message: aliasesInstalledMessage},
{Name: checkShimInPath, Status: doctor.StatusFail},
}
assert.True(t, isInterceptionActive(results))
}