chore: Add nil checks before returning wrapped error (#5309)

Signed-off-by: Luke Massa <lukefrederickmassa@gmail.com>
This commit is contained in:
Luke Massa
2025-02-11 00:10:58 -05:00
committed by GitHub
parent 1f9b90e715
commit cf0b3f3295
10 changed files with 77 additions and 29 deletions

View File

@@ -286,8 +286,14 @@ tunnels:
colorstring.Println("\n[green]Thank you for using atlantis :) \n[reset]For more information about how to use atlantis in production go to: https://www.runatlantis.io")
return nil
case err := <-ngrokErrors:
return errors.Wrap(err, "ngrok tunnel")
if err != nil {
err = errors.Wrap(err, "ngrok tunnel")
}
return err
case err := <-atlantisErrors:
return errors.Wrap(err, "atlantis server")
if err != nil {
err = errors.Wrap(err, "atlantis server")
}
return err
}
}