mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-09 04:19:53 +02:00
Use go-getter with secrets as well (#560)
* Use go-getter with secrets as well Signed-off-by: Quan TRAN <account@itscaro.me>
This commit is contained in:
+13
-2
@@ -13,6 +13,8 @@ import (
|
||||
"syscall"
|
||||
|
||||
"go.uber.org/zap"
|
||||
|
||||
"github.com/helmfile/helmfile/pkg/envvar"
|
||||
)
|
||||
|
||||
// Runner interface for shell commands
|
||||
@@ -68,9 +70,18 @@ func Output(c *exec.Cmd, logWriterGenerators ...*logWriterGenerator) ([]byte, er
|
||||
|
||||
var logWriters []io.Writer
|
||||
|
||||
id := newExecutionID()
|
||||
var id string
|
||||
if os.Getenv(envvar.DisableRunnerUniqueID) == "" {
|
||||
id = newExecutionID()
|
||||
}
|
||||
path := filepath.Base(c.Path)
|
||||
for _, g := range logWriterGenerators {
|
||||
logPrefix := fmt.Sprintf("%s:%s> ", filepath.Base(c.Path), id)
|
||||
var logPrefix string
|
||||
if id == "" {
|
||||
logPrefix = fmt.Sprintf("%s> ", path)
|
||||
} else {
|
||||
logPrefix = fmt.Sprintf("%s:%s> ", path, id)
|
||||
}
|
||||
logWriters = append(logWriters, g.Writer(logPrefix))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user