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
| ... | ... | @@ -682,7 +682,7 @@ const Daemon = struct { | |
| 682 | 682 | std.posix.exit(1); | |
| 683 | 683 | } | |
| 684 | 684 | ||
| 685 | - | const shell: [:0]const u8 = if (self.is_task_mode) "/bin/bash" else util.detectShell(); | |
| 685 | + | const shell: [:0]const u8 = if (self.is_task_mode) "bash" else util.detectShell(); | |
| 686 | 686 | // Use "-shellname" as argv[0] to signal login shell (traditional method) | |
| 687 | 687 | const login_shell = try std.fmt.allocPrintSentinel( | |
| 688 | 688 | alloc, |
| ... | ... | @@ -691,8 +691,8 @@ const Daemon = struct { | |
| 691 | 691 | 0, | |
| 692 | 692 | ); | |
| 693 | 693 | const argv = [_:null]?[*:0]const u8{ login_shell, null }; | |
| 694 | - | const err = std.posix.execveZ(shell, &argv, std.c.environ); | |
| 695 | - | std.log.err("execve failed: err={s}", .{@errorName(err)}); | |
| 694 | + | const err = std.posix.execvpeZ(shell, &argv, std.c.environ); | |
| 695 | + | std.log.err("execvpe failed: shell={s} err={s}", .{ shell, @errorName(err) }); | |
| 696 | 696 | std.posix.exit(1); | |
| 697 | 697 | } | |
| 698 | 698 |