chocolatey-community / Chocolatey

PowerShell Module and DSC Resource for Chocolatey Software
MIT License
43 stars 15 forks source link

Fix/68 #72

Closed gaelcolas closed 1 year ago

gaelcolas commented 1 year ago

Changed a bit the logic to validated the $Env:ChocolateyInstall as per #68.

gaelcolas commented 1 year ago

@Jaykul what about these changes?

codecov-commenter commented 1 year ago

Codecov Report

Patch and project coverage have no change.

Comparison is base (d8ffc93) 0.00% compared to head (7bfdeec) 0.00%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #72 +/- ## ===================================== Coverage 0.00% 0.00% ===================================== Files 3 3 Lines 70 70 ===================================== Misses 70 70 ``` Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=chocolatey-community). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=chocolatey-community)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

Jaykul commented 1 year ago

I think you still want to change:

https://github.com/chocolatey-community/Chocolatey/blob/bd094dfa12dfae092244255d693ab7c05f28f772/source/public/Install-ChocolateyPackage.ps1#L305

... to read from MACHINE scope explicitly, because you can't be sure it's set in process scope (you don't explicitly set it there, if it's already set in machine scope, and neither does the chocolatey installer).