Skip to content
This repository was archived by the owner on Feb 12, 2025. It is now read-only.
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion autorest/azure/cli/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,11 @@ func GetTokenFromCLIWithParams(params GetAccessTokenParams) (*Token, error) {

output, err := cliCmd.Output()
if err != nil {
return nil, fmt.Errorf("Invoking Azure CLI failed with the following error: %s", stderr.String())
if _, ok := err.(*exec.ExitError); ok {
return nil, fmt.Errorf("Invoking Azure CLI failed with the following error: %s", stderr.String())
}

return nil, fmt.Errorf("Invoking Azure CLI failed with the following error: %s", err.Error())
}

tokenResponse := Token{}
Expand Down