Skip to content

Commit

Permalink
rename platform > platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
jhheider authored and mxcl committed Apr 25, 2023
1 parent 2b3c107 commit db549fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</p>


# tea/cli 0.29.0
# tea/cli 0.30.0

`tea` puts the whole open source ecosystem at your fingertips:

Expand Down
10 changes: 5 additions & 5 deletions src/hooks/usePantry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ const getRuntimeEnvironment = async (pkg: Package): Promise<Record<string, strin
}

const available = async (pkg: PackageRequirement): Promise<boolean> => {
let { platform } = await entry(pkg).yml()
if (!platform) return true
if (isString(platform)) platform = [platform]
if (!isArray(platform)) throw new Error("bad-yaml")
return platform.includes(host().platform) ||platform.includes(`${host().platform}/${host().arch}`)
let { platforms } = await entry(pkg).yml()
if (!platforms) return true
if (isString(platforms)) platforms = [platforms]
if (!isArray(platforms)) throw new Error("bad-yaml")
return platforms.includes(host().platform) ||platforms.includes(`${host().platform}/${host().arch}`)
}

function entry({ project }: { project: string }): Entry {
Expand Down

0 comments on commit db549fa

Please sign in to comment.