Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

NuGetForUnity crashes when configured with a non-hierarchical local package folder #528

Closed
johnfoconnor opened this issue Jun 27, 2023 · 1 comment · Fixed by #530
Closed

Comments

@johnfoconnor
Copy link

this code introduced in #489 doesnt handle the searchTerm ""

https://github.com/GlitchEnzo/NuGetForUnity/blame/03353e7a94bd01ef6daa80e3a5fd85c7f5fa4725/src/NuGetForUnity/Editor/NugetPackageSource.cs#L324

System.ArgumentException: Invalid path
  at System.IO.Path.GetDirectoryName (System.String path) [0x0000d] in <4ba27aa039714eafa1e8892e51af2932>:0 
  at System.IO.Path.GetDirectoryName (System.ReadOnlySpan`1[T] path) [0x0000d] in <4ba27aa039714eafa1e8892e51af2932>:0 
  at System.IO.Enumeration.FileSystemEnumerableFactory.NormalizeInputs (System.String& directory, System.String& expression, System.IO.EnumerationOptions options) [0x00020] in <4ba27aa039714eafa1e8892e51af2932>:0 
  at System.IO.Directory.InternalEnumeratePaths (System.String path, System.String searchPattern, System.IO.SearchTarget searchTarget, System.IO.EnumerationOptions options) [0x0001c] in <4ba27aa039714eafa1e8892e51af2932>:0 
  at System.IO.Directory.GetDirectories (System.String path, System.String searchPattern, System.IO.EnumerationOptions enumerationOptions) [0x00000] in <4ba27aa039714eafa1e8892e51af2932>:0 
  at System.IO.Directory.GetDirectories (System.String path, System.String searchPattern) [0x00007] in <4ba27aa039714eafa1e8892e51af2932>:0 
  at NugetForUnity.NugetPackageSource.GetLocalPackages (System.String searchTerm, System.Boolean includeAllVersions, System.Boolean includePrerelease, System.Int32 numberToSkip) [0x00042] in Library/PackageCache/com.github-glitchenzo.nugetforunity@3.0.5/Editor/NugetPackageSource.cs:324 
  at NugetForUnity.NugetPackageSource.GetLocalUpdates (System.Collections.Generic.IEnumerable`1[T] installedPackages, System.Boolean includePrerelease, System.Boolean includeAllVersions) [0x00007] in Library/PackageCache/com.github-glitchenzo.nugetforunity@3.0.5/Editor/NugetPackageSource.cs:420 
  at NugetForUnity.NugetPackageSource.GetUpdates (System.Collections.Generic.IEnumerable`1[T] installedPackages, System.Boolean includePrerelease, System.Boolean includeAllVersions, System.String targetFrameworks, System.String versionContraints) [0x0000c] in Library/PackageCache/com.github-glitchenzo.nugetforunity@3.0.5/Editor/NugetPackageSource.cs:455 
  at NugetForUnity.NugetHelper.GetUpdates (System.Collections.Generic.IEnumerable`1[T] packagesToUpdate, System.Boolean includePrerelease, System.Boolean includeAllVersions, System.String targetFrameworks, System.String versionContraints) [0x00041] in Library/PackageCache/com.github-glitchenzo.nugetforunity@3.0.5/Editor/NugetHelper.cs:876 
  at NugetForUnity.NugetWindow.UpdateUpdatePackages () [0x00001] in Library/PackageCache/com.github-glitchenzo.nugetforunity@3.0.5/Editor/NugetWindow.cs:359 
  at NugetForUnity.NugetWindow.Refresh (System.Boolean forceFullRefresh) [0x000c4] in Library/PackageCache/com.github-glitchenzo.nugetforunity@3.0.5/Editor/NugetWindow.cs:320 
@JoC0de
Copy link
Collaborator

JoC0de commented Jun 29, 2023

@johnfoconnor thanks for the detailed information. I was able to direly fix the issue because of your information.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
2 participants