fix: warn on not respecting the requested apt version upon failures

This commit is contained in:
Amin Yahyaabadi 2024-08-16 00:35:35 -07:00
parent a06af07c8d
commit 080dafd056
No known key found for this signature in database
GPG Key ID: F52AF77F636088F0
7 changed files with 9 additions and 6 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -213,6 +213,9 @@ async function getAptArg(apt: string, name: string, version: string | undefined)
case AptPackageType.NameEqualsVersion:
return `${name}=${version}`
case AptPackageType.Name:
if (version !== undefined) {
warning(`Could not find package ${name} ${version}. Installing the latest version.`)
}
return name
default:
throw new Error(`Could not find package ${name} ${version ?? ""}`)