Skip to content

Commit b3f4f3e

Browse files
committed
fix generation of C language test targets
1 parent 9e6d441 commit b3f4f3e

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

lib/package/index.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,17 @@ const productValue = (
3131
};
3232

3333
const targetValue = (target: Target): Value => {
34-
let publicHeadersArg: Argument | null;
34+
let publicHeadersArg: Argument | null = null;
3535
switch (target.language.type) {
3636
case "cfamily":
37-
publicHeadersArg = arg(
38-
"publicHeadersPath",
39-
target.language.publicHeadersPath
40-
);
37+
if (target.role !== "test") {
38+
publicHeadersArg = arg(
39+
"publicHeadersPath",
40+
target.language.publicHeadersPath
41+
);
42+
}
4143
break;
4244
case "swift":
43-
publicHeadersArg = null;
4445
break;
4546
}
4647

0 commit comments

Comments
 (0)