[skip ci] make apt-get update optional success
This commit is contained in:
parent
e230ed2176
commit
fbcdddf031
1 changed files with 4 additions and 1 deletions
|
@ -20,7 +20,10 @@ fun Prov.aptInstall(packages: String, ignoreAlreadyInstalled: Boolean = true): P
|
|||
if (!allInstalled) {
|
||||
if (!isPackageInstalled(packages)) {
|
||||
if (!aptInit) {
|
||||
cmd("sudo apt-get update")
|
||||
optional {
|
||||
// may fail for some packages, but this should in general not be an issue
|
||||
cmd("sudo apt-get update")
|
||||
}
|
||||
cmd("sudo apt-get install -qy apt-utils")
|
||||
aptInit = true
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue