mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Merge pull request #380 from yuvipanda/debian-non-interactive
Tell apt-get to never ask questions
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user