mirror of
https://github.com/safedep/pmg.git
synced 2026-08-03 07:24:09 +02:00
fix: avoid resolving symlinks in shim PMG binary path (#303)
* fix: avoid resolving symlinks in shim PMG binary path Shims hardcoded the resolved Cellar path (e.g. /opt/homebrew/Cellar/pmg/0.16.0/bin/pmg) instead of the stable Homebrew symlink. This broke all shims after `brew upgrade` since the old Cellar directory is removed. Fixes #302 * fix pip test pkg version
This commit is contained in:
@@ -136,12 +136,7 @@ func currentExecutable() (string, error) {
|
||||
return "", fmt.Errorf("failed to resolve pmg executable: %w", err)
|
||||
}
|
||||
|
||||
resolved, err := filepath.EvalSymlinks(exe)
|
||||
if err != nil {
|
||||
return filepath.Abs(exe)
|
||||
}
|
||||
|
||||
return resolved, nil
|
||||
return filepath.Abs(exe)
|
||||
}
|
||||
|
||||
func shellQuote(value string) string {
|
||||
|
||||
Reference in New Issue
Block a user