make constant profile funcs more testable
parent
cd80371aad
commit
14fcdaa98b
|
@ -188,13 +188,21 @@ var ConfigFilePath = MakeMiniPath("config")
|
||||||
var ConfigFile = MakeMiniPath("config", "config.json")
|
var ConfigFile = MakeMiniPath("config", "config.json")
|
||||||
|
|
||||||
// GetProfileFile returns the Minikube profile config file
|
// GetProfileFile returns the Minikube profile config file
|
||||||
func GetProfileFile(profile string) string {
|
func GetProfileFile(profile string, miniHome ...string) string {
|
||||||
return filepath.Join(GetMinipath(), "profiles", profile, "config.json")
|
miniPath := GetMinipath()
|
||||||
|
if len(miniHome) > 0 {
|
||||||
|
miniPath = miniHome[0]
|
||||||
|
}
|
||||||
|
return filepath.Join(miniPath, "profiles", profile, "config.json")
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetProfilePath returns the Minikube profile path of config file
|
// GetProfilePath returns the Minikube profile path of config file
|
||||||
func GetProfilePath(profile string) string {
|
func GetProfilePath(profile string, miniHome ...string) string {
|
||||||
return filepath.Join(GetMinipath(), "profiles", profile)
|
miniPath := GetMinipath()
|
||||||
|
if len(miniHome) > 0 {
|
||||||
|
miniPath = miniHome[0]
|
||||||
|
}
|
||||||
|
return filepath.Join(miniPath, "profiles", profile)
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddonsPath is the default path of the addons configuration
|
// AddonsPath is the default path of the addons configuration
|
||||||
|
|
Loading…
Reference in New Issue