mirror of
https://github.com/oven-sh/bun
synced 2026-02-16 05:42:43 +00:00
Handle edgecase in is_atty
This commit is contained in:
@@ -1279,6 +1279,9 @@ pub const EventLoop = struct {
|
||||
}
|
||||
} else {
|
||||
loop.tickWithoutIdle();
|
||||
if (comptime Environment.isDebug) {
|
||||
log("tickWithoutIdle", .{});
|
||||
}
|
||||
}
|
||||
|
||||
this.flushImmediateQueue();
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user