Skip to content

Commit

Permalink
fix: warn on not respecting the requested apt version upon failures
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Aug 16, 2024
1 parent a06af07 commit 080dafd
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dist/actions/setup-cpp.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/actions/setup-cpp.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/legacy/setup-cpp.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/legacy/setup-cpp.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/modern/setup-cpp.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/modern/setup-cpp.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/utils/setup/setupAptPack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?? ""}`)
Expand Down

0 comments on commit 080dafd

Please sign in to comment.