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

(GH-1584) Fixed null reference exception in NugetCommon when source is null #1587

Conversation

jirkapok
Copy link
Contributor

@jirkapok jirkapok commented Jun 1, 2018

  • Added new unit test for NugetCommon
  • Fixed possible null reference exception when parsing sources from chocolateyconfig

Closes #1584

@jirkapok
Copy link
Contributor Author

jirkapok commented Jun 1, 2018

Codacy issues are false positive, i copied structure from other tests.

@jirkapok jirkapok force-pushed the bugfix/GH-1548_Objet_Reference_Exception branch from b5926f7 to c842a19 Compare June 1, 2018 19:12
@jirkapok jirkapok changed the title (GH-1548) Fixed null reference exception in NugetCommon when source is null (GH-1584) Fixed null reference exception in NugetCommon when source is null Jun 1, 2018
@jirkapok jirkapok force-pushed the bugfix/GH-1548_Objet_Reference_Exception branch from c842a19 to f507eb0 Compare July 24, 2018 16:04
@@ -77,7 +77,7 @@ public static IPackageRepository GetRemoteRepository(ChocolateyConfiguration con
};
}

IEnumerable<string> sources = configuration.Sources.Split(new[] { ";", "," }, StringSplitOptions.RemoveEmptyEntries);
IEnumerable<string> sources = configuration.Sources.to_string().Split(new[] { ";", "," }, StringSplitOptions.RemoveEmptyEntries);
Copy link
Member

Choose a reason for hiding this comment

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

👍

Copy link
Member

@ferventcoder ferventcoder left a comment

Choose a reason for hiding this comment

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

This looks great, thanks!

@ferventcoder ferventcoder changed the base branch from master to stable January 18, 2019 00:24
@ferventcoder ferventcoder changed the base branch from stable to master January 18, 2019 00:24
Copy link
Member

@ferventcoder ferventcoder left a comment

Choose a reason for hiding this comment

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

LGTM

@ferventcoder
Copy link
Member

This has been rebased and merged into stable at 7deb88e. Thanks!

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.

2 participants