Travis-ci console asks for answers

How can i answer a question made by the console in travis-ci? I made a script that is downloading gvm but right after it completes i receive something like this:

"Do you want grails 2.1.5 to be set as default? (Y/n):"

Right after this question the build can't go foward, i tried to use expects but i was not very successful, my travis.yml is this:

language: groovy

jdk: - oraclejdk7

before_install:

branches: only: - master

script: grails test-app --non-interactive

EDIT Grails wrapper is not working as you can see here

https://travis-ci.org/jpms2/ResS/builds/81761164

I seemed to find a problem like mine that happened with gvm instalation, the solution to this problem was a command like this:

So i tried to use this command and had no success:

Upvotes: 1

Views: 296

Answers (1)

I did find a way to pass the log message, using

  • echo sdkman_auto_answer=true > ~/.sdkman/etc/config

my travis.yml file is like this now:

language: groovy

jdk: - oraclejdk7

before_install:

  • rm -rf ~/.gvm
  • curl -s get.gvmtool.net > ~/install_gvm.sh
  • chmod 775 ~/install_gvm.sh
  • ~/install_gvm.sh
  • echo sdkman_auto_answer=true > ~/.sdkman/etc/config
  • source "/home/travis/.sdkman/bin/sdkman-init.sh"
  • sdk install grails 2.1.5

branches: only: - master

script: grails test-app --non-interactive

Upvotes: 0

Related Questions