From 03496a9486a097c5092870bea49444f07909e1fc Mon Sep 17 00:00:00 2001 From: Perry Date: Thu, 7 Sep 2023 00:47:01 -0300 Subject: [PATCH] Fix piping to null on powershell --- CommandExec/CommandUtils.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CommandExec/CommandUtils.cs b/CommandExec/CommandUtils.cs index 6271c52..4b1b839 100644 --- a/CommandExec/CommandUtils.cs +++ b/CommandExec/CommandUtils.cs @@ -14,7 +14,7 @@ public static bool CommandExists(string command) } else { - cmd = Command.Shell($"Get-Command -Name {command} -ErrorAction SilentlyContinue | $null") + cmd = Command.Shell($"Get-Command -Name {command} -ErrorAction SilentlyContinue > $null") .RedirectStdOut() .RedirectStdErr() .RedirectStdIn();