Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge pull request #530 from bcwaldon/write-to-stdout
Browse files Browse the repository at this point in the history
fix(fleetctl): write directly os.Stdout instead of tabwriter
  • Loading branch information
bcwaldon committed Jun 11, 2014
2 parents cc7616b + 9eb9c58 commit ddc39c8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fleetctl/fleetctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -573,14 +573,14 @@ func checkJobState(jobName string, js job.JobState, maxAttempts int, out io.Writ

if maxAttempts < 1 {
for {
if assertJobState(jobName, js) {
if assertJobState(jobName, js, out) {
return
}
time.Sleep(sleep)
}
} else {
for attempt := 0; attempt < maxAttempts; attempt++ {
if assertJobState(jobName, js) {
if assertJobState(jobName, js, out) {
return
}
time.Sleep(sleep)
Expand All @@ -589,7 +589,7 @@ func checkJobState(jobName string, js job.JobState, maxAttempts int, out io.Writ
}
}

func assertJobState(name string, js job.JobState) bool {
func assertJobState(name string, js job.JobState, out io.Writer) bool {
j, err := registryCtl.GetJob(name)
if err != nil {
log.Warningf("Error retrieving Job(%s) from Registry: %v", name, err)
Expand Down

0 comments on commit ddc39c8

Please sign in to comment.