Skip to content

Commit

Permalink
fix regression in construct-env.ts
Browse files Browse the repository at this point in the history
closes #1036
  • Loading branch information
jhheider authored and mxcl committed Sep 13, 2024
1 parent a539c8c commit c089b41
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/prefab/construct-env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ export default async function(pkgenv: { installations: Installation[] }) {
///////////////////////// reworked from useShellEnv needs porting back to libpkgx
async function mkenv({installations}: {installations: Installation[]}) {
const projects = new Set(installations.map(x => `${x.pkg.project}@${x.pkg.version}`))
console.assert(projects.size == installations.length, "pkgx: env is being duped")

// we need to do this as well, since we allow multiple versions of e.g. unicode.org.
// however, if we *just* use this as `projects`, then tests below like `projects.has('cmake.org')` will fail
const projects_with_versions = new Set(installations.map(x => `${x.pkg.project}@${x.pkg.version}`))
console.assert(projects_with_versions.size == installations.length, "pkgx: env is being duped")

const common_vars: Record<string, OrderedSet<string>> = {}
const common_keys = new Set<string>()
Expand Down

0 comments on commit c089b41

Please sign in to comment.