diff --git a/moar.go b/moar.go index baaaeef..46b2898 100644 --- a/moar.go +++ b/moar.go @@ -41,7 +41,11 @@ func _PrintUsage(output io.Writer) { moarPath, err := filepath.Abs(os.Args[0]) if err == nil { - if os.Getenv("PAGER") != moarPath { + pagerValue, err := filepath.Abs(os.Getenv("PAGER")) + if err != nil { + pagerValue = "" + } + if pagerValue != moarPath { // We're not the default pager fmt.Fprintln(output) fmt.Fprintln(output, "To make Moar your default pager, put the following line in")