mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-05 04:42:55 +00:00
fix(agents): use static shell snapshot temp prefix
This commit is contained in:
@@ -249,9 +249,7 @@ async function validateSnapshot(
|
||||
|
||||
async function captureShellSnapshot(opts: ShellSnapshotWrapOptions): Promise<string | null> {
|
||||
const shellName = path.basename(opts.shell);
|
||||
const captureOutputDir = await fs.mkdtemp(
|
||||
path.join(os.tmpdir(), `openclaw-shell-snapshot-${process.pid}-`),
|
||||
);
|
||||
const captureOutputDir = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-shell-snapshot-"));
|
||||
await fs.chmod(captureOutputDir, 0o700);
|
||||
const captureOutputPath = path.join(captureOutputDir, "snapshot.out");
|
||||
const captureOutputFile = await fs.open(captureOutputPath, "wx", 0o600);
|
||||
|
||||
Reference in New Issue
Block a user