summaryrefslogtreecommitdiff
path: root/src/exec.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/exec.zig')
-rw-r--r--src/exec.zig5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/exec.zig b/src/exec.zig
index 080d0aea..5b170375 100644
--- a/src/exec.zig
+++ b/src/exec.zig
@@ -440,7 +440,10 @@ fn refusedPlacement(p: *Pardes, id: usize) bool {
pub fn missingDir(p: *Pardes, dir: []const u8) bool {
if (comptime !hosted) return false;
if (p.host.vtable.spawn == null) return false;
- const local = @import("fs.zig").localPath(dir) orelse return false;
+ // A peer's directory (`/n/peer/x`) is no directory on this host, where
+ // the shell would start: no command or terminal runs there, and none
+ // is made to say `exit 127`.
+ const local = @import("fs.zig").localPath(dir) orelse return std.mem.startsWith(u8, dir, "/n/");
return !isDirectory(local);
}