Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

assemble throws object reference not set when dependency doesn't exist in repository #148

Closed
joaoopereira opened this issue Mar 11, 2022 · 0 comments · Fixed by #173 or #195
Closed
Labels
bug Something isn't working

Comments

@joaoopereira
Copy link
Collaborator

Repo Steps:

  • Create a package with a dependency PackageA@1.2.0
  • That package doesn't exist in repo

---> Cmf.Common.Cli.Utilities.CliException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at Cmf.Common.Cli.Commands.AssembleCommand.AssembleDependencies(IDirectoryInfo outputDir, Uri ciRepo, IDirectoryInfo[] repoDirectories, CmfPackage cmfPackage, DependencyCollection assembledDependencies, Boolean includeTestPackages) in /home/runner/work/cli/cli/cmf-cli/Commands/assemble/AssembleCommand.cs:line 243 at Cmf.Common.Cli.Commands.AssembleCommand.AssembleDependencies(IDirectoryInfo outputDir, Uri ciRepo, IDirectoryInfo[] repoDirectories, CmfPackage cmfPackage, DependencyCollection assembledDependencies, Boolean includeTestPackages) in /home/runner/work/cli/cli/cmf-cli/Commands/assemble/AssembleCommand.cs:line 262 at Cmf.Common.Cli.Commands.AssembleCommand.Execute(IDirectoryInfo workingDir, IDirectoryInfo outputDir, Uri ciRepo, Uri[] repos, Boolean includeTestPackages) in /home/runner/work/cli/cli/cmf-cli/Commands/assemble/AssembleCommand.cs:line 169

in this case the Uri will be null:
string dependencyPath = dependency.CmfPackage.Uri.GetFile().Directory.FullName;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants