File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -221,10 +221,13 @@ cleanPackages() {
221221 )
222222 fi
223223
224- sudo apt-get -qq remove -y --fix-missing " ${packages[@]} "
224+ WAIT_DPKG_LOCK=" -o DPkg::Lock::Timeout=60"
225+ sudo apt-get ${WAIT_DPKG_LOCK} -qq remove -y --fix-missing " ${packages[@]} "
225226
226- sudo apt-get autoremove -y || echo " ::warning::The command [sudo apt-get autoremove -y] failed"
227- sudo apt-get clean || echo " ::warning::The command [sudo apt-get clean] failed failed"
227+ sudo apt-get ${WAIT_DPKG_LOCK} autoremove -y \
228+ || echo " ::warning::The command [sudo apt-get autoremove -y] failed"
229+ sudo apt-get ${WAIT_DPKG_LOCK} clean \
230+ || echo " ::warning::The command [sudo apt-get clean] failed"
228231}
229232
230233# Remove Docker images.
You can’t perform that action at this time.
0 commit comments