mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-02 06:40:23 +00:00
fix(exec): suggest increasing timeout on timeouts
This commit is contained in:
committed by
Peter Steinberger
parent
91cdb703bd
commit
4c32411bee
@@ -535,8 +535,8 @@ export async function runExecProcess(opts: {
|
||||
: "Command not executable (permission denied)"
|
||||
: exit.reason === "overall-timeout"
|
||||
? typeof opts.timeoutSec === "number" && opts.timeoutSec > 0
|
||||
? `Command timed out after ${opts.timeoutSec} seconds`
|
||||
: "Command timed out"
|
||||
? `Command timed out after ${opts.timeoutSec} seconds. If this command is expected to take longer, re-run with a higher timeout (e.g., exec timeout=300).`
|
||||
: "Command timed out. If this command is expected to take longer, re-run with a higher timeout (e.g., exec timeout=300)."
|
||||
: exit.reason === "no-output-timeout"
|
||||
? "Command timed out waiting for output"
|
||||
: exit.exitSignal != null
|
||||
|
||||
@@ -458,6 +458,9 @@ describe("exec tool backgrounding", () => {
|
||||
allowBackground: false,
|
||||
});
|
||||
await expect(executeExecCommand(customBash, longDelayCmd)).rejects.toThrow(/timed out/i);
|
||||
await expect(executeExecCommand(customBash, longDelayCmd)).rejects.toThrow(
|
||||
/re-run with a higher timeout/i,
|
||||
);
|
||||
});
|
||||
|
||||
it.each<DisallowedElevationCase>(DISALLOWED_ELEVATION_CASES)(
|
||||
|
||||
Reference in New Issue
Block a user