mirror of
				https://github.com/cheat/cheat.git
				synced 2025-11-04 07:45:28 +01:00 
			
		
		
		
	chore: refactors config.path (small)
				
					
				
			Performs a minor refactoring on `config.Paths` to consistently use `path.Join` when computing config directory paths. Previously, both `path.Join` and `fmt.Sprintf` were being used, strictly due to an oversight.
This commit is contained in:
		@@ -32,8 +32,8 @@ func Paths(sys string, envvars map[string]string) ([]string, error) {
 | 
			
		||||
		}, nil
 | 
			
		||||
	case "windows":
 | 
			
		||||
		return []string{
 | 
			
		||||
			fmt.Sprintf("%s/cheat/conf.yml", envvars["APPDATA"]),
 | 
			
		||||
			fmt.Sprintf("%s/cheat/conf.yml", envvars["PROGRAMDATA"]),
 | 
			
		||||
			path.Join(envvars["APPDATA"], "/cheat/conf.yml"),
 | 
			
		||||
			path.Join(envvars["PROGRAMDATA"], "/cheat/conf.yml"),
 | 
			
		||||
		}, nil
 | 
			
		||||
	default:
 | 
			
		||||
		return []string{}, fmt.Errorf("unsupported os: %s", sys)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user