Skip to content

Commit

Permalink
Fixed multiple-instances case where the input is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
shlomi-noach committed Nov 23, 2015
1 parent 6214b79 commit 79fde52
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
set -e

RELEASE_VERSION="1.4.535"
RELEASE_VERSION="1.4.536"
TOPDIR=/tmp/orchestrator-release
export RELEASE_VERSION TOPDIR

Expand Down
5 changes: 3 additions & 2 deletions go/app/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,9 @@ func deduceInstanceKeyIfNeeded(instance string, instanceKey *inst.InstanceKey) *
// to take multiple instance names separated by a comma or whitespace.
func CliWrapper(command string, strict bool, instances string, destination string, owner string, reason string, duration string, pattern string, clusterAlias string, pool string, hostnameFlag string) {
r := regexp.MustCompile(`[ ,\r\n\t]+`)
for _, instance := range r.Split(instances, -1) {
if instance != "" {
tokens := r.Split(instances, -1)
for _, instance := range tokens {
if instance != "" || len(tokens) == 1 {
Cli(command, strict, instance, destination, owner, reason, duration, pattern, clusterAlias, pool, hostnameFlag)
}
}
Expand Down

0 comments on commit 79fde52

Please sign in to comment.