feat(FN-2689): standardize cross-platform shell selection
- Add engine shell utility to resolve the correct shell per platform - Update routine runner to execute commands through shared shell selection - Update cron runner to use the same cross-platform shell behavior - Apply shared shell handling in dashboard routes for command execution - Add shell utility tests covering platform-specific selection behavior
This commit is contained in:
@@ -24,6 +24,7 @@ import type {
|
||||
import type { HeartbeatMonitor } from "./agent-heartbeat.js";
|
||||
import type { AiPromptExecutor } from "./cron-runner.js";
|
||||
import { createLogger } from "./logger.js";
|
||||
import { defaultShell } from "./shell-utils.js";
|
||||
|
||||
const log = createLogger("routine-runner");
|
||||
const execAsync = promisify(exec);
|
||||
@@ -264,7 +265,7 @@ export class RoutineRunner {
|
||||
const { stdout, stderr } = await execAsync(command, {
|
||||
timeout: timeoutMs ?? DEFAULT_TIMEOUT_MS,
|
||||
maxBuffer: MAX_BUFFER,
|
||||
shell: "/bin/sh",
|
||||
shell: defaultShell,
|
||||
});
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user