Skip to content

Commit 19b267f

Browse files
committed
Updating data collection to choose the first cmdlet alias attribute in case of multiple attributes
1 parent d2f184b commit 19b267f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/CLU/Commands.ResourceManager.Common/AzureRmCmdlet.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ protected override void PromptForDataCollectionProfileIfNotExists()
142142

143143
protected override void InitializeQosEvent()
144144
{
145-
var commandAlias = this.GetType().GetTypeInfo().GetCustomAttribute<CliCommandAliasAttribute>();
145+
var commandAlias = GetType().GetTypeInfo().GetCustomAttributes<CliCommandAliasAttribute>().First();
146146
QosEvent = new AzurePSQoSEvent()
147147
{
148148
CommandName = commandAlias != null ? "az " + commandAlias.CommandName : this.MyInvocation?.MyCommand?.Name,

0 commit comments

Comments
 (0)