Skip to content

Commit 9b50382

Browse files
committed
fix: Cannot read properties of null (reading 'includes')
1 parent 4e2732a commit 9b50382

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/cubejs-backend-shared/src/platform.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ export function detectLibc() {
2727
// Using pipe to protect unexpect STDERR output
2828
stdio: 'pipe',
2929
});
30-
if (status === 0) {
30+
if (status === 0 && stdout) {
3131
if (stdout.includes('musl')) {
3232
return 'musl';
3333
}
3434

3535
if (stdout.includes('gnu')) {
3636
return 'gnu';
3737
}
38-
} else {
38+
} else if (stderr) {
3939
if (stderr.includes('musl')) {
4040
return 'musl';
4141
}

0 commit comments

Comments
 (0)