Skip to content

Commit 137d070

Browse files
committed
fix for invalid character 'c' looking for beginning of value
Signed-off-by: Smyslov Maxim <maksim.smyslov@flant.com>
1 parent 12877f4 commit 137d070

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

  • pkg/module_manager/models/hooks/kind

pkg/module_manager/models/hooks/kind/check.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,11 @@
1515
package kind
1616

1717
import (
18-
"bytes"
1918
"context"
20-
"encoding/json"
2119
"fmt"
2220
"log/slog"
2321
"os"
2422
"path/filepath"
25-
"strings"
2623

2724
"github.com/deckhouse/deckhouse/pkg/log"
2825
"github.com/deckhouse/module-sdk/pkg/settingscheck"
@@ -70,11 +67,7 @@ func (c *SettingsCheck) Check(ctx context.Context, settings utils.Values) (setti
7067

7168
cmd := executor.NewExecutor("", c.path, []string{"hook", "check"}, envs).WithLogger(c.logger.Named("executor"))
7269
if _, err = cmd.RunAndLogLines(ctx, make(map[string]string)); err != nil {
73-
trimmed := bytes.NewBufferString(strings.TrimPrefix(err.Error(), "stderr:"))
74-
75-
if err = json.NewDecoder(trimmed).Decode(&result); err != nil {
76-
return settingscheck.Result{}, fmt.Errorf("parse output: %s", err)
77-
}
70+
return settingscheck.Result{}, fmt.Errorf("run and log lines: %w", err)
7871
}
7972

8073
return result, nil

0 commit comments

Comments
 (0)