Skip to content

Commit

Permalink
add -c
Browse files Browse the repository at this point in the history
Signed-off-by: Nianyu Shen <xiaoyu9964@gmail.com>
  • Loading branch information
nianyush committed Sep 27, 2024
1 parent 7570dfe commit 712aa2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func handleClusterReset(event *pluggable.Event) pluggable.EventResponse {
}

clusterRootPath := utils.GetClusterRootPath(*config.Cluster)
cmd := exec.Command("/bin/sh", filepath.Join(clusterRootPath, "/opt/kubeadm/scripts", "kube-reset.sh"))
cmd := exec.Command("/bin/sh", "-c", filepath.Join(clusterRootPath, "/opt/kubeadm/scripts", "kube-reset.sh"))
output, err := cmd.CombinedOutput()
if err != nil {
response.Error = fmt.Sprintf("failed to reset cluster: %s", string(output))
Expand Down

0 comments on commit 712aa2b

Please sign in to comment.