Fix terminal issue
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { mkdir } from 'node:fs/promises';
|
||||
import path from 'node:path';
|
||||
import type { Readable } from 'node:stream';
|
||||
import { execa } from 'execa';
|
||||
@@ -350,6 +351,10 @@ export const ensureUserContainer = async (args: {
|
||||
{ reject: false, stdin: 'ignore' },
|
||||
);
|
||||
if (inspect.exitCode === 0 && inspect.stdout.trim() === 'true') return name;
|
||||
// The box mounts the per-user home, but it's created before the thread's clone
|
||||
// populates it — ensure it exists first, since podman (unlike docker) refuses to
|
||||
// bind-mount a missing source directory (statfs: no such file or directory).
|
||||
await mkdir(args.workdir, { recursive: true });
|
||||
// Not running: remove any stale container, then start fresh.
|
||||
await execa(containerRuntime(), ['rm', '-f', name], { reject: false });
|
||||
await execa(
|
||||
|
||||
Reference in New Issue
Block a user