Skip to content

Commit bec47a0

Browse files
author
Matthew Fisher
committed
Merge pull request #56 from bacongobbler/fix-install
fix(cmd): append "@1" if none supplied to install
2 parents 0fb828e + 37c348e commit bec47a0

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

cmd/cmd.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"path/filepath"
99
"regexp"
1010
"strconv"
11+
"strings"
1112

1213
"github.com/deis/deisctl/client"
1314
"github.com/deis/deisctl/config"
@@ -152,6 +153,13 @@ func Install(c client.Client, targets []string) error {
152153
return InstallPlatform(c)
153154
}
154155
// otherwise create the specific targets
156+
for i, target := range targets {
157+
// if we're installing a component without a number attached,
158+
// consider the user doesn't know better
159+
if !strings.Contains(target, "@") {
160+
targets[i] += "@1"
161+
}
162+
}
155163
return c.Create(targets)
156164
}
157165

0 commit comments

Comments
 (0)