Skip to content

Commit b49de75

Browse files
Fix Get-Service non-terminating error message to include category (#20276) (#20529)
1 parent 62699bd commit b49de75

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • src/Microsoft.PowerShell.Commands.Management/commands/management

src/Microsoft.PowerShell.Commands.Management/commands/management/Service.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ internal void WriteNonTerminatingError(
103103
string message = StringUtil.Format(errorMessage,
104104
serviceName,
105105
displayName,
106-
(innerException == null) ? string.Empty : innerException.Message);
106+
(innerException == null) ? category.ToString() : innerException.Message);
107107

108108
var exception = new ServiceCommandException(message, innerException);
109109
exception.ServiceName = serviceName;

0 commit comments

Comments
 (0)