fix: harden and simplify Linux system install

Tighten shim detection, profile repair, and install ordering while
trimming over-specific doctor/info hints from the system-install path.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Sahilb315
2026-07-11 02:19:59 +05:30
co-authored by Cursor
parent 7922606644
commit ffd0e7e759
13 changed files with 227 additions and 105 deletions
+12
View File
@@ -68,6 +68,18 @@ func TestShimManagerInstall(t *testing.T) {
assert.Contains(t, string(fishContent), ".pmg/bin")
}
func TestShimManagerRemoveReturnsDirectoryError(t *testing.T) {
root := t.TempDir()
blocker := filepath.Join(root, "blocker")
require.NoError(t, os.WriteFile(blocker, []byte("not a directory"), 0o644))
mgr := NewShimManager(ShimConfig{
BinDir: filepath.Join(blocker, "bin"),
})
assert.Error(t, mgr.Remove())
}
func TestShimManagerInstallIdempotent(t *testing.T) {
homeDir := t.TempDir()
binDir := filepath.Join(homeDir, ".pmg", "bin")