StartAppIfNotRunning is intended to replace much-duplicated code in the commands.
()
| 3792 | |
| 3793 | // StartAppIfNotRunning is intended to replace much-duplicated code in the commands. |
| 3794 | func (app *DdevApp) StartAppIfNotRunning() error { |
| 3795 | var err error |
| 3796 | status, _ := app.SiteStatus() |
| 3797 | if status != SiteRunning { |
| 3798 | err = app.Start() |
| 3799 | } |
| 3800 | |
| 3801 | return err |
| 3802 | } |
| 3803 | |
| 3804 | // GetContainerName returns the contructed container name of the |
| 3805 | // service provided. |