Skip to content

Commit c34a579

Browse files
committed
fix: install command
1 parent 8b63dc8 commit c34a579

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pkg/cli/install.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"context"
55
"fmt"
66
"os"
7-
"path/filepath"
87

98
"github.com/emosbaugh/helmbin/pkg/config"
109
"github.com/k0sproject/k0s/cmd/install"
@@ -60,8 +59,10 @@ func runInstallController(ctx context.Context, opts config.K0sControllerOptions,
6059

6160
args := []string{
6261
"controller",
63-
fmt.Sprintf("--data-dir=%s", filepath.Join(opts.DataDir, "k0s")),
64-
fmt.Sprintf("--config=%s", opts.CfgFile),
62+
fmt.Sprintf("--data-dir=%s", opts.DataDir),
63+
}
64+
if opts.CfgFile != "" {
65+
args = append(args, fmt.Sprintf("--config=%s", opts.CfgFile))
6566
}
6667
if opts.EnableWorker {
6768
args = append(args, "--enable-worker")

0 commit comments

Comments
 (0)