diff options
Diffstat (limited to 'src/host/root.zig')
| -rw-r--r-- | src/host/root.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/host/root.zig b/src/host/root.zig index 1edd9a4..f15493b 100644 --- a/src/host/root.zig +++ b/src/host/root.zig @@ -202,6 +202,12 @@ fn fs(init: std.process.Init, linked: ?abi.Sketch, options: Host.Options, words: defer thread.join(); try f.init(io, .{ .socket = .{ .handle = fds[1], .address = undefined } }, user); defer f.close(); + // A read answered here is not the running sketch's: said on stderr, so + // a script that reads before the sketch is up does not take it for one. + if (words.len > 0 and std.mem.eql(u8, words[0], "read")) { + try err.interface.print("{s}\n", .{from}); + try err.interface.flush(); + } return c9.verbs.run(&f, words, &in.interface, &out.interface, &err.interface); } |
