From 18ce5e5863cf7b9cc5ad827d5d347c478746f8a8 Mon Sep 17 00:00:00 2001 From: Max Kopjev Date: Thu, 21 Dec 2023 19:09:18 +0100 Subject: [PATCH] Fix creating test/nuget.config. (#6) --- Contentless/Program.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Contentless/Program.cs b/Contentless/Program.cs index d8a48e5..d560dd1 100644 --- a/Contentless/Program.cs +++ b/Contentless/Program.cs @@ -49,8 +49,9 @@ public static class Program { var referencesVersions = config.References.ToDictionary(x => x, _ => (string) null, StringComparer.OrdinalIgnoreCase); if (config.References.Length > 0) { if (args.Length > 1) { - Program.ExtractVersions(args[1], referencesVersions); - var settings = Settings.LoadDefaultSettings(Path.GetDirectoryName(args[1])); + var csprojFullPath = Path.GetFullPath(Path.Combine(Environment.CurrentDirectory, args[1])); + Program.ExtractVersions(csprojFullPath, referencesVersions); + var settings = Settings.LoadDefaultSettings(Path.GetDirectoryName(csprojFullPath)); packagesFolder = SettingsUtility.GetGlobalPackagesFolder(settings); } else { Console.Error.WriteLine("The config file contains references, but no project file was specified. Please specify the location of the content file you want to use for gathering references as the second argument.");