Skip to content

Commit 415de1d

Browse files
committed
fix(tools): narrow harness artifact path segments
1 parent 4f92d79 commit 415de1d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/tools/src/harness-artifacts.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ const sanitizePathSegment = (value: string) =>
1212
const formatRunTimestamp = (value: Date) =>
1313
value.toISOString().replace(/[:.]/g, '-');
1414

15+
const isDefined = (value: string | undefined): value is string =>
16+
value !== undefined;
17+
1518
export const createHarnessArtifactDirectory = ({
1619
artifactType,
1720
bundleId,
@@ -34,7 +37,7 @@ export const createHarnessArtifactDirectory = ({
3437
runnerName,
3538
bundleId,
3639
]
37-
.filter(Boolean)
40+
.filter(isDefined)
3841
.map((value) => sanitizePathSegment(value))
3942
.join('--');
4043
const directoryPath = path.join(artifactRoot, runDirName);

0 commit comments

Comments
 (0)