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

fix(fleetctl): write directly os.Stdout instead of tabwriter #530

Merged
merged 1 commit into from
Jun 11, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions fleetctl/fleetctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -571,14 +571,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 @@ -587,7 +587,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