"choco install" fails instantly with no output or reported error code, no indication of what's wrong

I am trying to add this Windows job to my existing, working build (which currently has two Linux jobs and two macOS jobs):

- stage: build
  os: windows
  language: shell
  before_install:
    - echo $PATH
    - choco --help
    - choco install jdk8
    - choco install maven
    - choco install python2
  script:
    - mvn --version

However, the stage fails with this output in just a matter of seconds:

$ echo $PATH
/bin:/usr/bin:/c/tools/ruby25/bin:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Windows/System32/OpenSSH:/c/ProgramData/GooGet:/c/Program Files/Google/Compute Engine/metadata_scripts:/c/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk/bin:/c/Program Files/Google/Compute Engine/sysprep:/c/Program Files/Docker:/c/ProgramData/chocolatey/bin:/c/Program Files/CMake/bin:/c/Program Files/Git/cmd:/c/Program Files/LLVM/bin:/c/Program Files/dotnet:/c/Users/travis/AppData/Local/Microsoft/WindowsApps:/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin

$ choco --help

That’s it. No other output. Even the raw log has nothing else:

e[0K$ echo $PATH
/bin:/usr/bin:/c/tools/ruby25/bin:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Windows/System32/OpenSSH:/c/ProgramData/GooGet:/c/Program Files/Google/Compute Engine/metadata_scripts:/c/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk/bin:/c/Program Files/Google/Compute Engine/sysprep:/c/Program Files/Docker:/c/ProgramData/chocolatey/bin:/c/Program Files/CMake/bin:/c/Program Files/Git/cmd:/c/Program Files/LLVM/bin:/c/Program Files/dotnet:/c/Users/travis/AppData/Local/Microsoft/WindowsApps:/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin
travis_time:end:073549f8:start=1548636756658699700,finish=1548636756781006400,duration=122306700
e[0Ktravis_fold:end:before_install.1
e[0Ktravis_fold:start:before_install.2
e[0Ktravis_time:start:0073009a
e[0K$ choco --help

I thought maybe the PATH wasn’t working, so I tried the full path to choco (/c/ProgramData/chocolatey/bin/choco) and that still didn’t work. Same exact problem—fails instantly, no output.

What am I doing wrong?

Here is the failing job: https://travis-ci.org/OddSource/java-raw-sockets/jobs/485189773
Here is the .travis.yml as of the moment I’m posting this, but with the Windows job commented out: https://github.com/OddSource/java-raw-sockets/blob/f3f5aa47486afa6d7c44da72c7c16ffa14b1f255/.travis.yml

Please see this thread: Current known issues — Please read this before posting a new topic