OneGet / MicrosoftDockerProvider

Provider to search, save and install Docker
Other
135 stars 56 forks source link

Fix bugs with Updating and Removing Env Variables #58

Closed AMoghrabi closed 5 years ago

AMoghrabi commented 5 years ago

I have discovered two bugs with this module:

  1. If you're installing Docker and the Docker path already exists in your system PATH variable, Update-VarPath will continue to add the Docker path to your system variable. The line 692 change corrects this behavior.

  2. When uninstalling docker, Remove-VarPath mistakenly uses the envVars variable instead of currPath. This will merge your currently running process's PATH and into your system variables PATH which can cause issues, as seen in this issue:

https://github.com/puppetlabs/puppetlabs-docker/issues/457

I tested it as much as I could locally. Let me know if I need to do any additional work to have this merged in.

Thanks!

AMoghrabi commented 5 years ago

Hi @cwilhit, Are you or is there someone on your team maintaining this repository? These bugs are a blocker for us as they cause issues upgrading or uninstalling docker using Puppet. I'd appreciate if someone can take a look at my PR.

Thanks!

cwilhit commented 5 years ago

Thanks for the ping. We'll take a look,

AMoghrabi commented 5 years ago

Thanks a lot!

cwilhit commented 5 years ago

We'll work on getting a new version of the module with this fix published to the PSGallery. Should be up some time today.