Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
Don't display "Error: <nil>" on successful deployment (#2300)
Browse files Browse the repository at this point in the history
  • Loading branch information
itowlson authored and jackfrancis committed Feb 16, 2018
1 parent 5843d96 commit 882c011
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 882c011

Please sign in to comment.