File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -24,9 +24,13 @@ def base_install_modules(module_name):
24
24
# depends
25
25
if counter == 1 :
26
26
for module in modules :
27
- command = ("apt-get -q --allow-downgrades --allow-remove-essential --allow-change-held-packages -y install " + module )
27
+ # Check if `apt-fast` is available, otherwise use apt-get
28
+ if subprocess .Popen ("which apt-fast >/dev/null" , shell = True ).wait () == 0 :
29
+ command = ("apt-fast -y install " + module )
30
+ else :
31
+ command = ("apt-get -q --allow-downgrades --allow-remove-essential --allow-change-held-packages -y install " + module )
28
32
subprocess .Popen ("export DEBIAN_FRONTEND=noninteractive;%s" %
29
- command , shell = True ).wait ()
33
+ command , shell = True ).wait ()
30
34
else :
31
35
command = ("apt-get -q --allow-downgrades --allow-remove-essential --allow-change-held-packages -y install " + modules )
32
36
subprocess .Popen ("export DEBIAN_FRONTEND=noninteractive;%s" %
You can’t perform that action at this time.
0 commit comments