mirror of
				https://github.com/cheat/cheat.git
				synced 2025-11-03 23:35:27 +01:00 
			
		
		
		
	fix(installer): always use more pager on Windows
				
					
				
			This commit is contained in:
		@@ -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")
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user