From 044a6edde487f17fd15042ca334d4c5f6d8367bc Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Tue, 5 Nov 2024 11:13:51 -0500 Subject: [PATCH] fix: unix separator replace --- src/NvGet.Tools.Shared/Arguments/ConsoleArgsContext.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NvGet.Tools.Shared/Arguments/ConsoleArgsContext.cs b/src/NvGet.Tools.Shared/Arguments/ConsoleArgsContext.cs index 9405f90..5aaa307 100644 --- a/src/NvGet.Tools.Shared/Arguments/ConsoleArgsContext.cs +++ b/src/NvGet.Tools.Shared/Arguments/ConsoleArgsContext.cs @@ -136,7 +136,7 @@ async Task> LoadFromStreamAsync() } else { - var alignedInputPathOrUrl = inputPathOrUrl.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar); + var alignedInputPathOrUrl = inputPathOrUrl.Replace(Path.DirectorySeparatorChar == '/' ? '\\' : '/', Path.DirectorySeparatorChar); using(var jsonTextReader = new JsonTextReader(File.OpenText(alignedInputPathOrUrl))) {