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 {
682682 std.posix.exit(1);
683683 }
684684
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();
686686 // Use "-shellname" as argv[0] to signal login shell (traditional method)
687687 const login_shell = try std.fmt.allocPrintSentinel(
688688 alloc,
......@@ -691,8 +691,8 @@ const Daemon = struct {
691691 0,
692692 );
693693 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) });
696696 std.posix.exit(1);
697697 }
698698