From 408399a8e9c4804570b6d24b69526486e679d0dc Mon Sep 17 00:00:00 2001 From: Vincent Wilms Date: Thu, 23 Jan 2025 21:19:43 +0100 Subject: [PATCH] Make resource locator optional --- CHANGELOG.md | 4 ++++ src/Nexus.Sources.Remote/Remote.cs | 2 +- version.json | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ea157d..a31d450 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## v2.0.0-beta.49 - 2025-01-23 + +- Make resource locator optional + ## v2.0.0-beta.48 - 2025-01-23 - Fix issues in underlying package management dependency diff --git a/src/Nexus.Sources.Remote/Remote.cs b/src/Nexus.Sources.Remote/Remote.cs index 09d241d..faefe16 100644 --- a/src/Nexus.Sources.Remote/Remote.cs +++ b/src/Nexus.Sources.Remote/Remote.cs @@ -67,7 +67,7 @@ public async Task SetContextAsync( // Resource locator var resourceLocatorString = Context.SourceConfiguration?.GetStringValue("resourceLocator"); - if (!Uri.TryCreate(resourceLocatorString, UriKind.Absolute, out var resourceLocator)) + if (resourceLocatorString is not null && !Uri.TryCreate(resourceLocatorString, UriKind.Absolute, out var resourceLocator)) throw new ArgumentException("The resource locator parameter is not a valid URI."); // Source configuration diff --git a/version.json b/version.json index fa05c43..929a5c5 100644 --- a/version.json +++ b/version.json @@ -1,4 +1,4 @@ { "version": "2.0.0", - "suffix": "beta.48" + "suffix": "beta.49" } \ No newline at end of file