Merge pull request #8974 from hashicorp/jbardin/no-fork
Add a way to avoid panicwrap when debugging
This commit is contained in:
commit
73183a064c
5
main.go
5
main.go
|
@ -26,6 +26,11 @@ func main() {
|
||||||
func realMain() int {
|
func realMain() int {
|
||||||
var wrapConfig panicwrap.WrapConfig
|
var wrapConfig panicwrap.WrapConfig
|
||||||
|
|
||||||
|
// don't re-exec terraform as a child process for easier debugging
|
||||||
|
if os.Getenv("TF_FORK") == "0" {
|
||||||
|
return wrappedMain()
|
||||||
|
}
|
||||||
|
|
||||||
if !panicwrap.Wrapped(&wrapConfig) {
|
if !panicwrap.Wrapped(&wrapConfig) {
|
||||||
// Determine where logs should go in general (requested by the user)
|
// Determine where logs should go in general (requested by the user)
|
||||||
logWriter, err := logging.LogOutput()
|
logWriter, err := logging.LogOutput()
|
||||||
|
|
Loading…
Reference in New Issue