Fixed bug with environment path for homebrew_cask

The patch fixes #7637