Skip to content

Commit

Permalink
Tell apt-get to never ask questions
Browse files Browse the repository at this point in the history
It seems to be blocking waiting on user input
for a couple packages now

Fixes #379
  • Loading branch information
yuvipanda committed Jun 18, 2019
1 parent eb8aaa0 commit 7d4ecf9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tljh/apt.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@ def install_packages(packages):
# Check if an apt-get update is required
if len(os.listdir('/var/lib/apt/lists')) == 0:
utils.run_subprocess(['apt-get', 'update', '--yes'])
env = os.environ.copy()
# Stop apt from asking questions!
env['DEBIAN_FRONTEND'] = 'noninteractive'
utils.run_subprocess([
'apt-get',
'install',
'--yes'
] + packages)
] + packages, env=env)

0 comments on commit 7d4ecf9

Please sign in to comment.