Error installing elm-json on Travis CI - Windows container
harmboschloo opened this issue · comments
I have a Windows (1809) container on Travis CI running with elm-test. But I get the following error from elm-tooling:
Failed to download:
< https://github.com/zwilias/elm-json/releases/download/v0.2.10/elm-json-v0.2.10-x86_64-pc-windows-msvc.tar.gz > C:\Users\travis\AppData\Roaming\elm\elm-tooling\elm-json\0.2.10\elm-json.exe
tar exited with exit code 2:
tar: C:\Users\travis\AppData\Roaming\elm\elm-tooling\elm-json: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
Hi!
This is what happens:
-
elm-tooling downloads
https://github.com/zwilias/elm-json/releases/download/v0.2.10/elm-json-v0.2.10-x86_64-pc-windows-msvc.tar.gz
. That succeeds. -
elm-tooling tries to extract elm-json.exe using
tar
. That seems to work well untiltar
tries to write the output toC:\Users\travis\AppData\Roaming\elm\elm-tooling\elm-json\0.2.10\elm-json.exe
.
Earlier elm-tooling has run fs.mkdirSync("C:\\Users\\travis\\AppData\\Roaming\\elm\\elm-tooling\\elm-json\\0.2.10")
so that directory should exist, but somehow it doesn’t!
Can you help debug this? Travis CI lets you SSH into failed builds or something, don’t they? If so you could have a look around and see how much of the C:\Users\travis\AppData\Roaming\elm\elm-tooling\elm-json\0.2.10\elm-json.exe
path exists, and what happens if you manually create directories there?
Hi.
Sorry, I don't know how to do that.
What I did notice is this the error was on C:\Users\travis\AppData\Roaming\elm\elm-tooling\elm-json
, which doesn't seem to be the whole path. But I'm not sure if that's relevant.
I managed to reproduce it. The issue is that Travis CI Windows runs in Git Bash. Git Bash ships with GNU tar
, which works differently from the built-in (BSD) tar
that comes with Windows.
The good thing is that I can reproduce on my own Windows machine when using Git Bash, so I should be able to fix it.
Fixed in v1.2.1. Thanks for reporting!