From b308913d9ef6e1a1956f12e085c68929c8a5e2dd Mon Sep 17 00:00:00 2001 From: Tudor Stanciu Date: Wed, 12 Jan 2022 17:25:29 +0200 Subject: [PATCH] fix --- .../Services/Windows/WindowsPowerService.cs | 3 +++ .../Commands/Lock.cs | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/agent/NetworkResurrector.Agent.Application/Services/Windows/WindowsPowerService.cs b/src/agent/NetworkResurrector.Agent.Application/Services/Windows/WindowsPowerService.cs index 3555bd5..075be3a 100644 --- a/src/agent/NetworkResurrector.Agent.Application/Services/Windows/WindowsPowerService.cs +++ b/src/agent/NetworkResurrector.Agent.Application/Services/Windows/WindowsPowerService.cs @@ -31,6 +31,9 @@ namespace NetworkResurrector.Agent.Application.Services.Windows private string SetOptions(string arguments, PowerOptions options) { + if (options == null) + options = new PowerOptions(null, false); + if (options.Force) arguments = $"{arguments} -f"; diff --git a/src/agent/NetworkResurrector.Agent.PublishedLanguage/Commands/Lock.cs b/src/agent/NetworkResurrector.Agent.PublishedLanguage/Commands/Lock.cs index de4d5d3..f91c110 100644 --- a/src/agent/NetworkResurrector.Agent.PublishedLanguage/Commands/Lock.cs +++ b/src/agent/NetworkResurrector.Agent.PublishedLanguage/Commands/Lock.cs @@ -7,6 +7,5 @@ namespace NetworkResurrector.Agent.PublishedLanguage.Commands public class Lock : Command { public ActionOwner Owner { get; set; } - public ActionOptions Options { get; set; } } }