Skip to content

Commit 0893d50

Browse files
committed
fix logic of exact match
1 parent d2fd474 commit 0893d50

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/fleet/installer/installer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ func (i *installerImpl) Purge(ctx context.Context) {
597597
// Note: If DD_NO_AGENT_UNINSTALL is set, then the agent will not be uninstalled.
598598
// This is used to prevent the agent from being uninstalled when purge is
599599
// called from within the MSI.
600-
if uninstallAgent, ok := os.LookupEnv("DD_NO_AGENT_UNINSTALL"); !ok && strings.ToLower(uninstallAgent) == "true" {
600+
if uninstallAgent, ok := os.LookupEnv("DD_NO_AGENT_UNINSTALL"); !ok || strings.ToLower(uninstallAgent) != "true" {
601601
err = i.hooks.PreRemove(ctx, packageDatadogAgent, packages.PackageTypeOCI, false)
602602
if err != nil {
603603
log.Warnf("could not remove agent: %v", err)

0 commit comments

Comments
 (0)