mirror of
https://github.com/safedep/pmg.git
synced 2026-08-03 07:24:09 +02:00
20 lines
462 B
Go
20 lines
462 B
Go
package shim
|
|||
|
|
|
||
|
|
import "fmt"
|
||
|
|
|
||
|
|
const commandNotFoundExitCode = 127
|
||
|
|
|
||
|
|
// BinaryNotFoundError is returned when a package manager name resolves through
|
||
|
|
// PMG shims but the real binary is absent from PATH (after shim dirs are stripped).
|
||
|
|
type BinaryNotFoundError struct {
|
||
|
|
Name string
|
||
|
|
}
|
||
|
|
|
||
|
|
func (e *BinaryNotFoundError) Error() string {
|
||
|
|
return fmt.Sprintf("%s is not installed", e.Name)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (e *BinaryNotFoundError) ExitCode() int {
|
||
|
|
return commandNotFoundExitCode
|
||
|
|
}
|