Ressources
This commit is contained in:
@@ -2,6 +2,7 @@ package helm
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
@@ -41,7 +42,6 @@ func (this HelmChart) Install() (string, error) {
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
// existe := false
|
||||
|
||||
if existe {
|
||||
return "Existe déjà", nil
|
||||
@@ -137,6 +137,7 @@ func (this HelmChart) exists() (bool, error) {
|
||||
cmd := exec.Command(cmd_args[0], cmd_args[1:]...)
|
||||
stdout, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
log.Log().Debug().Msg(string(stdout))
|
||||
return false, errors.New(string(stdout))
|
||||
}
|
||||
|
||||
@@ -144,6 +145,15 @@ func (this HelmChart) exists() (bool, error) {
|
||||
res = strings.TrimSuffix(res, "\n")
|
||||
|
||||
log.Log().Debug().Msg(string(stdout))
|
||||
log.Log().Debug().Msg(strconv.FormatBool(res != ""))
|
||||
|
||||
return res != "", nil
|
||||
}
|
||||
|
||||
func (this HelmChart) GetRessources() (map[string]string, error) {
|
||||
hs := HelmStatus{Name: this.Name}
|
||||
hs.New(this.Bin)
|
||||
data, _ := hs.getRessources()
|
||||
|
||||
return data, nil
|
||||
}
|
||||
Reference in New Issue
Block a user