Skip to content

Commit 63c9b0a

Browse files
committed
fix: typecheck
1 parent 631828b commit 63c9b0a

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

packages/gettext.tg.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,9 @@ export const test = async () => {
183183
};
184184
// On Linux, libintl.h is provided by glibc, not by this package.
185185
if (std.triple.os(std.triple.host()) === "linux") {
186-
spec.headers = spec.headers?.filter((h) => h !== "libintl.h");
186+
if (spec.headers) {
187+
spec.headers = spec.headers.filter((h) => h !== "libintl.h");
188+
}
187189
}
188190
return await std.assert.pkg(build, spec);
189191
};

packages/poetry/tangram.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export const build = async (args: BuildArgs) => {
9595
// Parse the lockfile into a requirements.txt.
9696
const requirements = await lockfile.requirements({
9797
lockFile: poetryLock,
98-
exclude: args.exclude,
98+
...(args.exclude !== undefined && { exclude: args.exclude }),
9999
});
100100

101101
// Install the requirements specified by the poetry.lock file.
@@ -123,6 +123,7 @@ export const build = async (args: BuildArgs) => {
123123
let packageDir: tg.Directory;
124124
if (poetryMeta.packages && poetryMeta.packages.length > 0) {
125125
const pkg = poetryMeta.packages[0];
126+
tg.assert(pkg, "Missing packages entry in poetry configuration.");
126127
const from = pkg.from ?? ".";
127128
const path = from === "." ? pkg.include : `${from}/${pkg.include}`;
128129
packageDir = tg.Directory.expect(await args.source.get(path));

0 commit comments

Comments
 (0)