test
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
package helm
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"os/exec"
|
||||
)
|
||||
|
||||
func Version(path string) (string, error) {
|
||||
|
||||
cmd := exec.Command(path, "version", "--short")
|
||||
stdout, err := cmd.CombinedOutput()
|
||||
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
res := string(stdout)
|
||||
res = strings.TrimSuffix(res, "\n")
|
||||
return res, nil
|
||||
}
|
||||
package helm
|
||||
|
||||
import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
||||
func (this HelmCommand) GetVersion() (string, error) {
|
||||
|
||||
cmd := this.Exec(this.Bin, "version", "--short")
|
||||
stdout, err := cmd.CombinedOutput()
|
||||
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
res := string(stdout)
|
||||
res = strings.TrimSuffix(res, "\n")
|
||||
return res, nil
|
||||
}
|
||||
Reference in New Issue
Block a user