My team and I are using Elixir and Travis CI for a project, when it comes to fetching and installing dependencies, it asks if it should install
hex . I was wondering if I can pass a
--yes option to mix so that it doesn’t ask but just installs?
Couple of things here, you can add this command to your
before_install hook in your
mix local.hex --force
You’ve already installed Elixir in a previous command with the
- mkdir -p vendor/elixir
- wget -q https://github.com/elixir-lang/elixir/releases/download/$ELIXIR/Precompiled.zip && unzip -qq Precompiled.zip -d vendor/elixir
- export PATH="$PATH:$PWD/vendor/elixir/bin"
- mix local.hex --force
script: "MIX_ENV=test mix do deps.get, test"
The second fix would be as with any UNIX command, you can pipe the
yes into the mix command, as follows:
yes | MIX_ENV=test mix do deps.get, compile, test