Fix issue where running service had to be stopped to install in a new install-dir. Closes #1216

This commit is contained in:
Binaek Sarkar
2021-12-13 15:00:29 +05:30
committed by GitHub
parent 842dea5fe4
commit 7040ffbfdf

View File

@@ -49,9 +49,6 @@ func EnsureDBInstalled(ctx context.Context) (err error) {
return err
}
log.Println("[TRACE] calling killPreviousInstanceIfAny")
display.UpdateSpinnerMessage(spinner, "Cleanup any Steampipe processes...")
killInstanceIfAny(ctx)
log.Println("[TRACE] calling removeRunningInstanceInfo")
err = removeRunningInstanceInfo()
if err != nil && !os.IsNotExist(err) {
@@ -232,6 +229,7 @@ func runInstall(ctx context.Context, firstInstall bool, spinner *spinner.Spinner
log.Printf("[TRACE] getNextFreePort failed: %v", err)
return fmt.Errorf("Starting database... FAILED!")
}
process, err := startServiceForInstall(port)
if err != nil {
display.StopSpinner(spinner)