Chocolatey isn't installed or accessible?



Here is one build that I did as an experiment to see what was going on:

Essentially, the ‘choco’ executable isn’t in the PATH of the shell environment that Travis uses. (Context: .travis.yml) I was previously using the default ‘ruby’ language configuration, but I’ve since transitioned to the ‘shell’ language for my Windows builds. In my previously mentioned experiment, my travis script simply executed ‘choco --help’ and then the build failed without any stderr to debug with.

I bet that Chocolatey is installed, but it’s just not in the PATH of the Travis shell. I’m going to check the default install directory and use an absolute path to execute choco.


I’ve made another build:

This build does a few things and still has the problem. First of all, my .travis.yml script adds the chocolatey bin to the PATH environment variable. Then the chocolatey home directory is listed and shows that chocolatey is installed. After that the script goes on to fail when attempting to use the ‘choco’ command.


I think the problem is here:

You are setting VS14_BIN to a value containing white spaces, then using that to set PATH, which would be mostly useless with almost nothing in it. Try escaping white spaces.