From 04a17fcdaa923fe567be8d0a99e456c3bf448ae8 Mon Sep 17 00:00:00 2001 From: 9547 Date: Tue, 26 Jan 2021 22:54:32 +0800 Subject: [PATCH] fix(cluster/spec): convert to ctxt.Executor --- pkg/cluster/spec/server_config.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/cluster/spec/server_config.go b/pkg/cluster/spec/server_config.go index fd5c3fa8da..c59bbccb77 100644 --- a/pkg/cluster/spec/server_config.go +++ b/pkg/cluster/spec/server_config.go @@ -27,7 +27,6 @@ import ( perrs "github.com/pingcap/errors" "github.com/pingcap/tiup/pkg/cluster/clusterutil" "github.com/pingcap/tiup/pkg/cluster/ctxt" - "github.com/pingcap/tiup/pkg/cluster/executor" "github.com/pingcap/tiup/pkg/logger/log" "github.com/pingcap/tiup/pkg/meta" "github.com/pingcap/tiup/pkg/utils" @@ -236,7 +235,7 @@ func mergeImported(importConfig []byte, specConfigs ...map[string]interface{}) ( // BindVersion map the cluster version to the third components binding version. type BindVersion func(comp string, version string) (bindVersion string) -func checkConfig(ctx context.Context, e executor.Executor, componentName, clusterVersion, nodeOS, arch, config string, paths meta.DirPaths, bindVersion BindVersion) error { +func checkConfig(ctx context.Context, e ctxt.Executor, componentName, clusterVersion, nodeOS, arch, config string, paths meta.DirPaths, bindVersion BindVersion) error { var cmd string configPath := path.Join(paths.Deploy, "conf", config) switch componentName { @@ -274,7 +273,7 @@ func checkConfig(ctx context.Context, e executor.Executor, componentName, cluste cmd = fmt.Sprintf("%s --config-check --config=%s %s", binPath, configPath, extra) } - _, _, err := e.Execute(cmd, false) + _, _, err := e.Execute(ctx, cmd, false) if err != nil { return perrs.Annotate(ErrorCheckConfig, err.Error()) }