Skip to content

Commit

Permalink
Do not check for updates if libman.json file is missing
Browse files Browse the repository at this point in the history
Check the libman.json file exists before checking for updates. Fixes
error logged due to a null filename being used for the libman.json
file when checking for updates.

Could not get Library Manager updates for ''
System.ArgumentNullException: Value cannot be null. (Parameter 'key')
   at System.Collections.Generic.Dictionary`2.FindValue(TKey key)
   at System.Collections.Generic.Dictionary`2.ContainsKey(TKey key)
   at Microsoft.Web.LibraryManager.Vsix.Contracts.DependenciesFactory.FromConfigFile(String configFilePath)
   at MonoDevelop.LibraryManager.Updates.UpdatedLibrariesService.GetUpdatesAsync(FilePath configFilePath, CancellationToken cancellationToken)
   at MonoDevelop.LibraryManager.Updates.UpdatedLibrariesService.SafeGetUpdatesAsync(FilePath configFilePath, CancellationToken cancellationToken)
  • Loading branch information
mrward committed Feb 19, 2023
1 parent e00a2ac commit 8112399
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ async Task CheckForUpdatesInternalAsync(Solution solution, CancellationToken can
}

FilePath manifestFileName = project.GetManifestFileName();
if (manifestFileName.IsNull)
{
continue;
}

List<UpdatedLibraryInfo> manifestUpdates = await SafeGetUpdatesAsync(
manifestFileName,
Expand Down

0 comments on commit 8112399

Please sign in to comment.