diff --git a/GNUmakefile b/GNUmakefile index ff896acab357..47b4ace1eec2 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -59,10 +59,12 @@ terraform build provider: make tpgtools mmv1: + # Chaining these with "&&" is critical so this will exit non-0 if the first + # command fails, since we're not forcing bash and errexit / pipefail here. cd mmv1;\ if [ "$(VERSION)" = "ga" ]; then \ - go run . --output $(OUTPUT_PATH) --version ga --no-docs $(mmv1_compile); \ - go run . --output $(OUTPUT_PATH) --version beta --no-code $(mmv1_compile); \ + go run . --output $(OUTPUT_PATH) --version ga --no-docs $(mmv1_compile) \ + && go run . --output $(OUTPUT_PATH) --version beta --no-code $(mmv1_compile); \ else \ go run . --output $(OUTPUT_PATH) --version $(VERSION) $(mmv1_compile); \ fi diff --git a/mmv1/main.go b/mmv1/main.go index 0db8a11238fc..214bfc49dbce 100644 --- a/mmv1/main.go +++ b/mmv1/main.go @@ -132,9 +132,13 @@ func main() { } startTime := time.Now() + providerName := "default (terraform)" + if *forceProvider != "" { + providerName = *forceProvider + } log.Printf("Generating MM output to '%s'", *outputPath) - log.Printf("Using %s version", *version) - log.Printf("Using %s provider", *forceProvider) + log.Printf("Building %s version", *version) + log.Printf("Building %s provider", providerName) // Building compute takes a long time and can't be parallelized within the product // so lets build it first diff --git a/mmv1/provider/terraform.go b/mmv1/provider/terraform.go index 056a1ffeb893..89c7aeecd457 100644 --- a/mmv1/provider/terraform.go +++ b/mmv1/provider/terraform.go @@ -499,7 +499,7 @@ func (t Terraform) CompileFileList(outputFolder string, files map[string]string, func (t Terraform) addHashicorpCopyRightHeader(outputFolder, target string) { if !expectedOutputFolder(outputFolder) { - log.Printf("Unexpected output folder (%s) detected"+ + log.Printf("Unexpected output folder (%s) detected "+ "when deciding to add HashiCorp copyright headers.\n"+ "Watch out for unexpected changes to copied files", outputFolder) }