Provisioning Ubuntu vm through CI doesn't fail when provision script has command which is not unattended (-y)

Hello, I would expect the travis build job to fail when it is provisioning a linux vm with a script which has commands that are not unattended (dont have the ‘-y’ flag or similar).

For example the following is passing the build:
apt-get install python3-pip

Isn’t that suppose to eventually fail the build because the command suggests it should wait for an input from user (by typing ‘yes’ when asked to install).

Here is the build url in which you can also find the reference for a commit with very basic provisioning script:
https://travis-ci.org/IlanZuckerman/baboon/builds/651959361

.travis file content:

dist: bionic

script:
- sudo ./bootstrap.sh

When reporting problems, please include relevant build URLs. Thanks.

We set DEBIAN_FRONTEND=noninteractive to avoid such unnecessary interaction.

Thanks BanzaiMan, that explains it all.
BDW, is it possible to set this flag to be other that ‘noninteractive’ via travis configuration?

You can set environment variables:

But it may not be effective depending on the purpose of setting it. (Some commands are executed before user-defined environment variables are effective.)

Imprint