From 758ae29fedfad44dec77253ba65f94a6c0075a5c Mon Sep 17 00:00:00 2001 From: Lars Berger Date: Wed, 6 Sep 2023 04:26:48 +0800 Subject: [PATCH] feat: return early if ignore command --- .../CommandHandlers/RunWithSubjectContainerHandler.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/GlazeWM.Domain/UserConfigs/CommandHandlers/RunWithSubjectContainerHandler.cs b/GlazeWM.Domain/UserConfigs/CommandHandlers/RunWithSubjectContainerHandler.cs index 6667b2e9f..cb1c70bdf 100644 --- a/GlazeWM.Domain/UserConfigs/CommandHandlers/RunWithSubjectContainerHandler.cs +++ b/GlazeWM.Domain/UserConfigs/CommandHandlers/RunWithSubjectContainerHandler.cs @@ -34,6 +34,10 @@ public CommandResponse Handle(RunWithSubjectContainerCommand command) var subjectContainerId = subjectContainer.Id; + // Return early if any of the commands is an ignore command. + if (commandStrings.Any(command => command == 'ignore')) + return CommandResponse.Ok; + // Invoke commands in sequence. foreach (var commandString in commandStrings) {