fix extraArgs
This commit is contained in:
parent
44479eb1da
commit
2f4c128545
4
main.go
4
main.go
@ -22,7 +22,7 @@ func createCluster(c *cli.Context) error {
|
|||||||
}
|
}
|
||||||
extraArgs := []string{}
|
extraArgs := []string{}
|
||||||
if c.IsSet("volume") {
|
if c.IsSet("volume") {
|
||||||
extraArgs = append(extraArgs, fmt.Sprintf("--volume %s", c.String("volume")))
|
extraArgs = append(extraArgs, "--volume", c.String("volume"))
|
||||||
}
|
}
|
||||||
if len(extraArgs) > 0 {
|
if len(extraArgs) > 0 {
|
||||||
for _, extra := range extraArgs {
|
for _, extra := range extraArgs {
|
||||||
@ -47,7 +47,7 @@ func createCluster(c *cli.Context) error {
|
|||||||
|
|
||||||
func deleteCluster(c *cli.Context) error {
|
func deleteCluster(c *cli.Context) error {
|
||||||
cmd := "docker"
|
cmd := "docker"
|
||||||
args := []string{"rm", "-f", c.String("name")}
|
args := []string{"rm", c.String("name")}
|
||||||
log.Printf("Deleting cluster [%s]", c.String("name"))
|
log.Printf("Deleting cluster [%s]", c.String("name"))
|
||||||
log.Printf("Running command: %+v", exec.Command(cmd, args...).Args)
|
log.Printf("Running command: %+v", exec.Command(cmd, args...).Args)
|
||||||
if err := exec.Command(cmd, args...).Run(); err != nil {
|
if err := exec.Command(cmd, args...).Run(); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user