Skip to content

Commit f21901c

Browse files
committed
HTMLC-143: fixed bug
1 parent 9bb24a8 commit f21901c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

source/HtmlCompiler.Core/CLIManager.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System.Diagnostics;
2+
using System.Runtime.InteropServices;
23
using System.Text;
34
using HtmlCompiler.Core.Exceptions;
45
using HtmlCompiler.Core.Interfaces;
@@ -15,7 +16,7 @@ public string ExecuteCommand(string command)
1516
{
1617
ProcessStartInfo processInfo = new ProcessStartInfo
1718
{
18-
FileName = "bash", // Verwende eine Shell (z.B. bash) zum Ausführen des Befehls
19+
FileName = ((RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) ? "pwsh" : "bash"),
1920
Arguments = $"-c \"{command}\"",
2021
RedirectStandardOutput = true,
2122
RedirectStandardError = true,

source/HtmlCompiler.Tests/Core/Dependencies/NodeDependencyTests.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ public void SetUp()
2525
[DataRow("v14.17.0")]
2626
[DataRow("v18.1.9\n")]
2727
[DataRow("v20.4.0\n")]
28+
[DataRow("v20.9.0\n")]
29+
[DataRow("v18.1.9\r\n")]
30+
[DataRow("v20.4.0\r\n")]
31+
[DataRow("v20.9.0\r\n")]
2832
public async Task CheckAsync_WithValidVersions_Return(string consoleResult)
2933
{
3034
this._cliManager.ExecuteCommand(Arg.Any<string>())

0 commit comments

Comments
 (0)