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

Commit 8181393

Browse files
authored
Do not run watcher during APPSODY_PREP command (#58)
* 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
1 parent dec12c9 commit 8181393

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

main.go

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -502,15 +502,7 @@ func runCommands(commandString string, theProcessType ProcessType, killServer bo
502502
cmps.mu.Lock()
503503

504504
if theProcessType == server {
505-
if appsodyPREP != "" {
506-
ControllerDebug.log("Running APPSODY_PREP command: ", appsodyPREP)
507505

508-
_, err = runPrep(appsodyPREP, interactive)
509-
}
510-
if err != nil {
511-
ControllerError.log("FATAL error APPSODY_PREP command received an error. The controller is exiting: ", err)
512-
os.Exit(1)
513-
}
514506
// keep going
515507
cmd, err = startProcess(commandString, server, interactive)
516508
ControllerDebug.log("Started RUN/DEBUG/TEST process")
@@ -735,6 +727,16 @@ func main() {
735727
ControllerDebug.log("Done processing controller signal handler.")
736728
}()
737729

730+
if appsodyPREP != "" {
731+
ControllerDebug.log("Running APPSODY_PREP command: ", appsodyPREP)
732+
733+
_, err = runPrep(appsodyPREP, interactiveFlag)
734+
}
735+
if err != nil {
736+
ControllerError.log("FATAL error APPSODY_PREP command received an error. The controller is exiting: ", err)
737+
os.Exit(1)
738+
}
739+
738740
if fileChangeCommand == "" || disableWatcher {
739741
ControllerDebug.log("The fileChangeCommand environment variable APPSODY_RUN/DEBUG/TEST_ON_CHANGE is unspecified or file watching was disabled by the CLI.")
740742
ControllerDebug.log("Running APPSODY_RUN,APPSODY_DEBUG or APPSODY_TEST sync: " + startCommand)

0 commit comments

Comments
 (0)