From 70fc83b9ed24a54e94b1016948269f042f24df89 Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Tue, 5 Nov 2024 07:59:28 -0500 Subject: [PATCH] fix: Support both unix and windows paths for versionOverride --- src/NvGet.Tools.Shared/Arguments/ConsoleArgsContext.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/NvGet.Tools.Shared/Arguments/ConsoleArgsContext.cs b/src/NvGet.Tools.Shared/Arguments/ConsoleArgsContext.cs index b6b55d9..9405f90 100644 --- a/src/NvGet.Tools.Shared/Arguments/ConsoleArgsContext.cs +++ b/src/NvGet.Tools.Shared/Arguments/ConsoleArgsContext.cs @@ -136,7 +136,9 @@ async Task> LoadFromStreamAsync() } else { - using(var jsonTextReader = new JsonTextReader(File.OpenText(inputPathOrUrl))) + var alignedInputPathOrUrl = inputPathOrUrl.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar); + + using(var jsonTextReader = new JsonTextReader(File.OpenText(alignedInputPathOrUrl))) { return jsonSerializer.Deserialize>(jsonTextReader); }