Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.

Commit 0c5700a

Browse files
author
Mrinal Wahal
committed
fixed UI/UX bug in git ops
1 parent 48aabdb commit 0c5700a

4 files changed

Lines changed: 17 additions & 2 deletions

File tree

cmd/dev_test.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,19 @@ var firstRunDevTest = test{
3737
return err
3838
}
3939

40+
// Ensure required number of containers have been launched
41+
//
42+
// Since, we are already performing multiple health checks, we can
43+
// safely just fetch the number of running containers.
44+
containers, err := env.GetContainers()
45+
if err != nil {
46+
return err
47+
}
48+
49+
if len(containers) != len(env.Config.Services) {
50+
return fmt.Errorf("expected %d containers, got %d", len(env.Config.Services), len(containers))
51+
}
52+
4053
return nil
4154
},
4255
validator: pathsCreated,

environment/environment.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ func (e *Environment) UpdateState(state State) {
5454
case Active:
5555
status.Success(fmt.Sprintf("Your app is running at %shttp://localhost:%s%s %s(Ctrl+C to stop)%s", util.Blue, e.Port, util.Reset, util.Gray, util.Reset))
5656
status.Infoln(fmt.Sprintf("%sEmails will be sent to http://localhost:%d%s", util.Gray, e.Config.Services["mailhog"].Port, util.Reset))
57+
status.Reset()
5758
case Inactive:
5859
status.Success("See you later, grasshopper!")
5960
case Failed:

environment/git.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func (e *Environment) restartMigrations() error {
6868

6969
// Inform the user of detection
7070
status.Info("We've detected change in local git commit")
71-
log.Warn("We're fixing your data accordingly. Give us a moment!")
71+
status.Warnln("We're fixing your data accordingly. Give us a moment!")
7272

7373
// Initialize cancellable context ONLY for this shutdown oepration
7474
e.ExecutionContext, e.ExecutionCancel = context.WithCancel(e.Context)
@@ -128,7 +128,7 @@ func (e *Environment) restartAfterCheckout() error {
128128
e.ExecutionCancel()
129129
}
130130

131-
log.Warn("We're recreating your environment accordingly. Give us a moment!")
131+
status.Warnln("We're recreating your environment accordingly. Give us a moment!")
132132

133133
// update DOT_NHOST directory
134134
nhost.DOT_NHOST, _ = nhost.GetDotNhost()

util/status.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ func (s *Status) Update(value int) {
157157

158158
// Reset total status value
159159
func (s *Status) Reset() {
160+
s.Value = 0
160161
s.Total = 0
161162
s.Print()
162163
}

0 commit comments

Comments
 (0)