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

Avoid adding nuget actions for dependencies if dependency behavior is ignore #878

Merged
merged 1 commit into from
Sep 21, 2016

Conversation

jainaashish
Copy link
Contributor

While updating packages, it currently gets all the dependencies for target packages to generate nuget actions even though dependency behavior is set to ignore. This change will avoid it so that update won't fail or throw some random error for missing dependencies when passing IgnoreDependencies flag.

Fix NuGet/Home#1298

@rrelyea @joelverhagen @emgarten @alpaix

@@ -1111,14 +1111,17 @@ private void InitializePackagesFolderInfo(string packagesFolderPath, bool exclud

var installedPackagesInDependencyOrder = await GetInstalledPackagesInDependencyOrder(nuGetProject, token);

var isDependencyBehaviorIgnore = resolutionContext.DependencyBehavior == DependencyBehavior.Ignore;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why map the DependencyBehavior enum to a bool? Couldn't you pass it all the way down and make this == check at the last moment?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I take that back. Passing down a bool is better in this case since the bool is used in multiple places.

@joelverhagen
Copy link
Member

Address comment then :shipit:

@jainaashish jainaashish merged commit af0e90b into dev Sep 21, 2016
@jainaashish jainaashish deleted the asja-fix1298 branch February 27, 2017 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants