mirror of
https://github.com/safedep/pmg.git
synced 2026-08-03 07:24:09 +02:00
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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user