Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

Commit

Permalink
Do not run watcher during APPSODY_PREP command (#58)
Browse files Browse the repository at this point in the history
* temporary key change

* reverted key

* change image name and remove script file

* image name changes CMD added

* initial code drop

* initial release

* reap after no watcher normal exit

* Move prep before watcher starts

* Update main.go

* gofmt issue
  • Loading branch information
kewegner authored Dec 10, 2019
1 parent dec12c9 commit 8181393
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -502,15 +502,7 @@ func runCommands(commandString string, theProcessType ProcessType, killServer bo
cmps.mu.Lock()

if theProcessType == server {
if appsodyPREP != "" {
ControllerDebug.log("Running APPSODY_PREP command: ", appsodyPREP)

_, err = runPrep(appsodyPREP, interactive)
}
if err != nil {
ControllerError.log("FATAL error APPSODY_PREP command received an error. The controller is exiting: ", err)
os.Exit(1)
}
// keep going
cmd, err = startProcess(commandString, server, interactive)
ControllerDebug.log("Started RUN/DEBUG/TEST process")
Expand Down Expand Up @@ -735,6 +727,16 @@ func main() {
ControllerDebug.log("Done processing controller signal handler.")
}()

if appsodyPREP != "" {
ControllerDebug.log("Running APPSODY_PREP command: ", appsodyPREP)

_, err = runPrep(appsodyPREP, interactiveFlag)
}
if err != nil {
ControllerError.log("FATAL error APPSODY_PREP command received an error. The controller is exiting: ", err)
os.Exit(1)
}

if fileChangeCommand == "" || disableWatcher {
ControllerDebug.log("The fileChangeCommand environment variable APPSODY_RUN/DEBUG/TEST_ON_CHANGE is unspecified or file watching was disabled by the CLI.")
ControllerDebug.log("Running APPSODY_RUN,APPSODY_DEBUG or APPSODY_TEST sync: " + startCommand)
Expand Down

0 comments on commit 8181393

Please sign in to comment.