mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-20 06:20:32 +00:00
fix: use flush instead of end on stdout in code generators for Windows compatibility
This commit is contained in:
@@ -87,7 +87,9 @@ pub fn main() !void {
|
||||
var buf: [4096]u8 = undefined;
|
||||
var stdout = std.fs.File.stdout().writer(&buf);
|
||||
try t.writeZig(&stdout.interface);
|
||||
try stdout.end();
|
||||
// Use flush instead of end because stdout is a pipe when captured by
|
||||
// the build system, and pipes cannot be truncated (especially on Windows).
|
||||
try stdout.interface.flush();
|
||||
|
||||
// Uncomment when manually debugging to see our table sizes.
|
||||
// std.log.warn("stage1={} stage2={} stage3={}", .{
|
||||
|
||||
@@ -34,7 +34,9 @@ pub fn main() !void {
|
||||
var buf: [4096]u8 = undefined;
|
||||
var stdout = std.fs.File.stdout().writer(&buf);
|
||||
try t.writeZig(&stdout.interface);
|
||||
try stdout.end();
|
||||
// Use flush instead of end because stdout is a pipe when captured by
|
||||
// the build system, and pipes cannot be truncated (especially on Windows).
|
||||
try stdout.interface.flush();
|
||||
|
||||
// Uncomment when manually debugging to see our table sizes.
|
||||
// std.log.warn("stage1={} stage2={} stage3={}", .{
|
||||
|
||||
Reference in New Issue
Block a user