Many times when installing applications on Windows the path gets updated but Chef doesnt have the updated path. When the application gets called it cant find the application in path and the step fails.
Add the refreshenv.rb file to the libraries folder and notifies
and ruby_block
to the resource that needs reloading.
This code is from https://stackoverflow.com/a/49993683 and is based on the Chocolatey code