Commit ce66992
Jonas Lergell
·
2026-06-01 08:38:07 -0400 EDT
parent 9889a13
fix(run): resolve task bash from PATH (#164)
1 files changed,
+3,
-3
+3,
-3
1@@ -682,7 +682,7 @@ const Daemon = struct {
2 std.posix.exit(1);
3 }
4
5- const shell: [:0]const u8 = if (self.is_task_mode) "/bin/bash" else util.detectShell();
6+ const shell: [:0]const u8 = if (self.is_task_mode) "bash" else util.detectShell();
7 // Use "-shellname" as argv[0] to signal login shell (traditional method)
8 const login_shell = try std.fmt.allocPrintSentinel(
9 alloc,
10@@ -691,8 +691,8 @@ const Daemon = struct {
11 0,
12 );
13 const argv = [_:null]?[*:0]const u8{ login_shell, null };
14- const err = std.posix.execveZ(shell, &argv, std.c.environ);
15- std.log.err("execve failed: err={s}", .{@errorName(err)});
16+ const err = std.posix.execvpeZ(shell, &argv, std.c.environ);
17+ std.log.err("execvpe failed: shell={s} err={s}", .{ shell, @errorName(err) });
18 std.posix.exit(1);
19 }
20