diff --git a/src/agent/run.ts b/src/agent/run.ts index 42cb50c..1056d0b 100644 --- a/src/agent/run.ts +++ b/src/agent/run.ts @@ -75,7 +75,7 @@ function createAgentServer( }; const getPreferredShell = () => { - return currentConfig.terminal?.preferredShell || process.env.SHELL; + return currentConfig.terminal?.preferredShell || process.env.SHELL || '/bin/bash'; }; const terminalHandler = new TerminalHandler({ diff --git a/src/agent/systemd.ts b/src/agent/systemd.ts index d767c34..88c599a 100644 --- a/src/agent/systemd.ts +++ b/src/agent/systemd.ts @@ -33,6 +33,7 @@ export function generateServiceFile(options: InstallOptions = {}): string { `Environment=PERRY_PORT=${port}`, `Environment=PERRY_CONFIG_DIR=${configDir}`, `Environment=NODE_ENV=production`, + `Environment=SHELL=/bin/bash`, ]; if (options.noHostAccess) { @@ -126,9 +127,27 @@ export async function installService(options: InstallOptions = {}): Promise