Skip to content

Commit

Permalink
Merge pull request canonical#1958 from mvo5/bugfix/progress-finish
Browse files Browse the repository at this point in the history
snap: remove extra newline after progress is done
  • Loading branch information
chipaca authored Sep 21, 2016
2 parents acf4063 + 88e5f8f commit ac54745
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions cmd/snap/cmd_disconnect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (s *SnapSuite) TestDisconnectExplicitEverything(c *C) {
rest, err := Parser().ParseArgs([]string{"disconnect", "producer:plug", "consumer:slot"})
c.Assert(err, IsNil)
c.Assert(rest, DeepEquals, []string{})
c.Assert(s.Stdout(), Equals, "\n")
c.Assert(s.Stdout(), Equals, "")
c.Assert(s.Stderr(), Equals, "")
}

Expand Down Expand Up @@ -124,7 +124,7 @@ func (s *SnapSuite) TestDisconnectEverythingFromSpecificSlot(c *C) {
rest, err := Parser().ParseArgs([]string{"disconnect", "consumer:slot"})
c.Assert(err, IsNil)
c.Assert(rest, DeepEquals, []string{})
c.Assert(s.Stdout(), Equals, "\n")
c.Assert(s.Stdout(), Equals, "")
c.Assert(s.Stderr(), Equals, "")
}

Expand Down Expand Up @@ -159,6 +159,6 @@ func (s *SnapSuite) TestDisconnectEverythingFromSpecificSnap(c *C) {
rest, err := Parser().ParseArgs([]string{"disconnect", "consumer"})
c.Assert(err, IsNil)
c.Assert(rest, DeepEquals, []string{})
c.Assert(s.Stdout(), Equals, "\n")
c.Assert(s.Stdout(), Equals, "")
c.Assert(s.Stderr(), Equals, "")
}
1 change: 0 additions & 1 deletion cmd/snap/cmd_snap_op.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ func wait(client *client.Client, id string) (*client.Change, error) {
pb := progress.NewTextProgress()
defer func() {
pb.Finished()
fmt.Fprint(Stdout, "\n")
}()

tMax := time.Time{}
Expand Down
1 change: 1 addition & 0 deletions progress/progress.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ func (t *TextProgress) Start(pkg string, total float64) {
t.pbar.Total = int64(total)
t.pbar.ShowSpeed = true
t.pbar.Units = pb.U_BYTES
t.pbar.NotPrint = true
t.pbar.Start()
}

Expand Down

0 comments on commit ac54745

Please sign in to comment.