fixes build of tea.xyz/gx/cc

This commit is contained in:
Jacob Heider 2022-12-07 11:33:12 -04:00 committed by Jacob Heider
parent 58701369e1
commit 6cdf1e0a5e
2 changed files with 6 additions and 2 deletions

View file

@ -143,7 +143,7 @@ async function __build(pkg: Package): Promise<BuildResult> {
} }
} }
async function fetch_src(pkg: Package): Promise<[Path, Path]> { async function fetch_src(pkg: Package): Promise<[Path, Path] | undefined> {
console.log('fetching', pkgstr(pkg)) console.log('fetching', pkgstr(pkg))
// we run this as a script because we dont want these deps imported into *this* env // we run this as a script because we dont want these deps imported into *this* env
@ -155,5 +155,9 @@ async function fetch_src(pkg: Package): Promise<[Path, Path]> {
}) })
const out = await proc.output() const out = await proc.output()
const [dstdir, tarball] = new TextDecoder().decode(out).split("\n") const [dstdir, tarball] = new TextDecoder().decode(out).split("\n")
if (!tarball) {
// no tarball, e.g. tea.xyz/gx/cc
return undefined
}
return [new Path(dstdir), new Path(tarball)] return [new Path(dstdir), new Path(tarball)]
} }