Handle edgecase in is_atty

This commit is contained in:
Jarred Sumner
2024-03-04 23:08:26 -08:00
parent 719c2f18fb
commit d69398d3fa
2 changed files with 4 additions and 1 deletions

View File

@@ -1279,6 +1279,9 @@ pub const EventLoop = struct {
}
} else {
loop.tickWithoutIdle();
if (comptime Environment.isDebug) {
log("tickWithoutIdle", .{});
}
}
this.flushImmediateQueue();

View File

@@ -350,7 +350,7 @@ pub fn stdin(rare: *RareData) *Blob.Store {
.pathlike = .{
.fd = fd,
},
.is_atty = std.os.isatty(bun.STDIN_FD.cast()),
.is_atty = if (bun.STDIN_FD.isValid()) std.os.isatty(bun.STDIN_FD.cast()) else false,
.mode = mode,
},
},