scripts: await useShellEnv

This commit is contained in:
Gustav Westling 2022-11-28 16:52:20 +01:00 committed by Max Howell
parent e49f2be09c
commit 163b793f46
2 changed files with 4 additions and 4 deletions

View file

@ -28,7 +28,7 @@ export default async function _build(pkg: Package): Promise<BuildResult> {
async function __build(pkg: Package): Promise<BuildResult> {
const [deps, wet, resolved] = await calc_deps()
await clean()
const env = mkenv()
const env = await mkenv()
const dst = cellar.keg(pkg).mkpath()
const [src, src_tarball] = await fetch_src(pkg) ?? []
const installation = await build()
@ -70,8 +70,8 @@ async function __build(pkg: Package): Promise<BuildResult> {
}
}
function mkenv() {
const env = useShellEnv({ installations: resolved})
async function mkenv() {
const env = await useShellEnv({ installations: resolved})
if (platform == 'darwin') {
env['MACOSX_DEPLOYMENT_TARGET'] = ['11.0']

View file

@ -37,7 +37,7 @@ async function test(self: Installation) {
// get linked when they're tested.
await link(self)
const env = useShellEnv({ installations: [self, ...installations] })
const env = await useShellEnv({ installations: [self, ...installations] })
let text = undent`
#!/bin/bash