fix(global): Add windows support(need testing), fix userInput, refacto

This commit is contained in:
Matthieu 'JP' DERASSE
2022-07-25 20:19:38 +00:00
parent 94975d5f33
commit 66ff28f6cd
7 changed files with 156 additions and 32 deletions

View File

@ -16,7 +16,7 @@ import (
var version = "0.0.1"
var verbose = false
var acceptAll = false
var dependencyList = []dependencies.Dependency{
var dependencyList = []dependencies.DependencyInterface{
dependencies.Git{},
dependencies.Golang{},
dependencies.Swagger{},

View File

@ -79,7 +79,7 @@ func runUpgradeAction(cmd *cobra.Command, args []string) {
answer := helpers.YesOrNoInput()
if !answer {
log.Infof("Where do you want to install %s ?", dependency.GetName())
installDirectory = helpers.IsValidPathInput()
installDirectory = helpers.PathInput()
}
} else {
@ -96,7 +96,7 @@ func runUpgradeAction(cmd *cobra.Command, args []string) {
return
}
log.Infof("Where do you want to install %s ?", dependency.GetName())
installDirectory = helpers.IsValidPathInput()
installDirectory = helpers.PathInput()
}
log.Infof("%s", dependency.DescribeInstall(installDirectory))