Skip to content

Commit 08f67cd

Browse files
authored
fix: validate --volume path (#66)
1 parent e684bbe commit 08f67cd

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

sandbox/mod.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ export const sandboxCreateCommand = new Command<SandboxContext>()
6161
const name = value.slice(0, separatorIndex);
6262
const path = value.slice(separatorIndex + 1);
6363

64+
if (path === "/") {
65+
throw new ValidationError(
66+
"Volume mount path cannot be /, use --root instead",
67+
);
68+
}
69+
6470
previous[path] = name;
6571

6672
return previous;

0 commit comments

Comments
 (0)