Merge pull request #8974 from hashicorp/jbardin/no-fork

Add a way to avoid panicwrap when debugging
This commit is contained in:
James Bardin 2016-09-21 14:21:51 -04:00 committed by GitHub
commit 73183a064c
1 changed files with 5 additions and 0 deletions

View File

@ -26,6 +26,11 @@ func main() {
func realMain() int {
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) {
// Determine where logs should go in general (requested by the user)
logWriter, err := logging.LogOutput()