Skip to content

Commit

Permalink
Don't display "Error: <nil>" on successful deployment (Azure#2300)
Browse files Browse the repository at this point in the history
  • Loading branch information
itowlson authored and Terje Torkelsen committed Mar 15, 2018
1 parent 2988f32 commit 8481a9d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/armhelpers/deployments.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package armhelpers

import (
"fmt"

"github.com/Azure/azure-sdk-for-go/arm/resources/resources"
"github.com/Azure/go-autorest/autorest"
log "github.com/sirupsen/logrus"
Expand Down Expand Up @@ -31,7 +33,11 @@ func (az *AzureClient) DeployTemplate(resourceGroupName, deploymentName string,
return nil, err
}

log.Infof("Finished ARM Deployment (%s). Error: %v", deploymentName, err)
outcomeText := "Succeeded"
if err != nil {
outcomeText = fmt.Sprintf("Error: %v", err)
}
log.Infof("Finished ARM Deployment (%s). %s", deploymentName, outcomeText)

return &res, err
}
Expand Down

0 comments on commit 8481a9d

Please sign in to comment.