Skip to content

Commit

Permalink
Don't throw if a package has dlls but no node libraries. (#13626)
Browse files Browse the repository at this point in the history
  • Loading branch information
sm6srw authored Dec 9, 2022
1 parent 0c48518 commit 940ce05
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/DynamoPackages/PackageLoader.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
Expand Down Expand Up @@ -692,15 +692,14 @@ private Version CheckAndGetPackageVersion(string version, string name, string di
/// </summary>
/// <param name="packageDirectoryPath">path to package location</param>
/// <param name="discoveredPkg">package object to check</param>
private static void CheckPackageNodeLibraryCertificates(string packageDirectoryPath, Package discoveredPkg)
private void CheckPackageNodeLibraryCertificates(string packageDirectoryPath, Package discoveredPkg)
{
var dllfiles = new System.IO.DirectoryInfo(discoveredPkg.BinaryDirectory).EnumerateFiles("*.dll");
if (discoveredPkg.Header.node_libraries.Count() == 0 && dllfiles.Count() != 0)
{
throw new LibraryLoadFailedException(packageDirectoryPath,
String.Format(
Resources.InvalidPackageNoNodeLibrariesDefinedInPackageJson,
discoveredPkg.Name, discoveredPkg.RootDirectory));
Log(String.Format(
String.Format(Resources.InvalidPackageNoNodeLibrariesDefinedInPackageJson,
discoveredPkg.Name, discoveredPkg.RootDirectory)));
}

foreach (var nodeLibraryAssembly in discoveredPkg.Header.node_libraries)
Expand Down

0 comments on commit 940ce05

Please sign in to comment.