Observe the following:
modpath - that modifies the pathThen later down:
https://github.com/chocolatey/chocolatey-coreteampackages/blob/3dc9d447caca4251d4b2dd6d241c8a9f39b4430e/automatic/ruby/tools/chocolateyInstall.ps1#L23
The work for path is being done twice. And if you want /NoPath, you are still going to have it added to path.
Fixed.
Most helpful comment
Fixed.