From 2a6586b41b2f366f4864167ac0655f900540a732 Mon Sep 17 00:00:00 2001 From: Christopher Allen Lane Date: Mon, 8 Aug 2022 20:37:27 -0400 Subject: [PATCH] fix(installer): always use `more` pager on Windows --- internal/config/pager.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/config/pager.go b/internal/config/pager.go index 1b26638..850116b 100644 --- a/internal/config/pager.go +++ b/internal/config/pager.go @@ -3,11 +3,17 @@ package config import ( "os" "os/exec" + "runtime" ) // Pager attempts to locate a pager that's appropriate for the environment. func Pager() string { + // default to `more` on Windows + if runtime.GOOS == "windows" { + return "more" + } + // if $PAGER is set, return the corresponding pager if os.Getenv("PAGER") != "" { return os.Getenv("PAGER")