Skip to content

Commit d11dddc

Browse files
authored
Fix exit code from GacUninstallCommand when the assembly is not in the GAC (#7003)
## Summary of changes Fixes the return code for the `GacUninstallCommand` when the assembly is not in the GAC ## Reason for change If the assembly isn't in the GAC, we shouldn't return error when uninstalling it, because the desired state is correct. This was changed in #6995 but is an unintended behaviour change ## Implementation details - Change the exit code `1` -> `0` - Write a success message instead of a warning - Fix typo ## Test coverage 🙈 ## Other details Currently some of the other "failure" messages are _effectively_ the same thing, so it might make change to change those too. However, their behaviour wasn't changed in #6995 so is non-critical
1 parent 4657b42 commit d11dddc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tracer/src/Datadog.Trace.Tools.Runner/GacUninstallCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ private void Execute(InvocationContext context)
4646
var installedAssemblyNames = gacMethods.GetAssemblyNames(assemblyName!);
4747
if (installedAssemblyNames.Count == 0)
4848
{
49-
Utils.WriteWarning($"Assembly '{assemblyName}' is not installed the GAC.");
50-
context.ExitCode = 1;
49+
Utils.WriteSuccess($"Assembly '{assemblyName}' is not installed in the GAC.");
50+
context.ExitCode = 0;
5151
return;
5252
}
5353

0 commit comments

Comments
 (0)