From 6cdf1e0a5e33e11121bfcb6f06a544bba6d7da0e Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Wed, 7 Dec 2022 11:33:12 -0400 Subject: [PATCH] fixes build of tea.xyz/gx/cc --- projects/tea.xyz/gx/cc/package.yml | 2 +- scripts/build/build.ts | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/projects/tea.xyz/gx/cc/package.yml b/projects/tea.xyz/gx/cc/package.yml index 35d4c4c1..ba141ccf 100644 --- a/projects/tea.xyz/gx/cc/package.yml +++ b/projects/tea.xyz/gx/cc/package.yml @@ -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 diff --git a/scripts/build/build.ts b/scripts/build/build.ts index 60361fab..04cd21a3 100644 --- a/scripts/build/build.ts +++ b/scripts/build/build.ts @@ -143,7 +143,7 @@ async function __build(pkg: Package): Promise { } } -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 don’t 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)] }