diff --git a/tljh/apt.py b/tljh/apt.py index b155124..49be946 100644 --- a/tljh/apt.py +++ b/tljh/apt.py @@ -39,6 +39,9 @@ def install_packages(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([ 'apt-get', 'install',