if projects are unknown, get-platform.ts still needs a return

This commit is contained in:
Jacob Heider 2023-02-07 13:00:18 -05:00
parent 7007a564b6
commit 2f7e0f3a93
No known key found for this signature in database
GPG key ID: A98011B5713535BF
2 changed files with 2 additions and 2 deletions

View file

@ -30,7 +30,7 @@ jobs:
path: $HOME/.cache/deno
key: ${{ runner.os }}-deno-get-platform-${{ hashFiles('deno.jsonc')}}
- uses: teaxyz/setup@v0
- run: scripts/get-platform.ts ${{ inputs.projects }}
- run: scripts/get-platform.ts
id: platform
env:
PLATFORM: ${{ inputs.platform }}

View file

@ -102,7 +102,7 @@ if (Deno.env.get("GITHUB_OUTPUT")) {
}
function sizedUbuntu(packages: (Package | PackageRequirement)[]): string {
const size = Math.max(...packages.map(p => exceptions[p.project] ?? 2))
const size = Math.max(2, ...packages.map(p => exceptions[p.project] ?? 2))
if (size == 2) {
return "ubuntu-latest"