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

@ -1,6 +1,6 @@
distributable: ~
# FIXME we want the c version eg. c99
# FIXME we want the c version eg. c99
# or should that be some kind of option? so you specify you want a cc that support c99
versions:
- 0.1.1

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))
// 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 [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)]
}