mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Run apt-get update before installing if required
This commit is contained in:
@@ -39,6 +39,9 @@ def install_packages(packages):
|
|||||||
"""
|
"""
|
||||||
Install debian packages
|
Install debian packages
|
||||||
"""
|
"""
|
||||||
|
# Check if an apt-get update is required
|
||||||
|
if len(os.listdir('/var/lib/apt/lists')) == 0:
|
||||||
|
subprocess.check_output(['apt-get', 'update', '--yes'])
|
||||||
subprocess.check_output([
|
subprocess.check_output([
|
||||||
'apt-get',
|
'apt-get',
|
||||||
'install',
|
'install',
|
||||||
|
|||||||
Reference in New Issue
Block a user