Skip to content

Commit 26e90c3

Browse files
committed
Fix: Ensure app settings are saved when 'shutdown' command is used.
1 parent c58c215 commit 26e90c3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

G33kShell.Desktop/Terminal/Commands/ShutdownCommand.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
using System.Diagnostics;
1212
using System.Runtime.InteropServices;
1313
using System.Threading.Tasks;
14+
using Avalonia;
15+
using DTC.Core.Extensions;
1416
using G33kShell.Desktop.Terminal.Attributes;
1517

1618
namespace G33kShell.Desktop.Terminal.Commands;
@@ -29,6 +31,8 @@ protected override Task<bool> Run(ITerminalState state)
2931
{
3032
FileName = "shutdown", Arguments = $"/s /f /t {delayInSeconds}", CreateNoWindow = true, UseShellExecute = false
3133
}) != null;
34+
if (success)
35+
Application.Current.GetMainWindow().Close();
3236
return Task.FromResult(success);
3337
}
3438
}

0 commit comments

Comments
 (0)