fix(Config): colorization without pager (#687)

Fix an issue whereby colorization would output ANSI codes if a pager was
not configured.

The solution here is to stop guessing about the state of the user's
system at runtime, as well as the user's intention. The installer now
chooses an appropriate installer when generating configs, and no longer
bothers searching for pagers at runtime.
This commit is contained in:
Christopher Allen Lane
2022-08-07 10:16:52 -04:00
parent 4fdec50487
commit d598d96fce
6 changed files with 68 additions and 57 deletions

View File

@ -23,6 +23,7 @@ func Run(configs string, confpath string) error {
// template the above paths into the default configs
configs = strings.Replace(configs, "COMMUNITY_PATH", community, -1)
configs = strings.Replace(configs, "PERSONAL_PATH", personal, -1)
configs = strings.Replace(configs, "PAGER_PATH", config.Pager(), -1)
// prompt the user to download the community cheatsheets
yes, err := Prompt(