You can now create nested directories when running a command in a sandbox.
Before, this request gave an error because the data
directory didn't exist:
POST /v1/exec
{
"sandbox": "ash",
"command": "run",
"files": {
"": "cat data/hello.txt",
"data/hello.txt": "hello world!"
}
}
Now this request creates the data
directory before writing hello.txt
, and the command works just fine:
{
"id": "ash_run_86408aef",
"ok": true,
"duration": 542,
"stdout": "hello world!",
"stderr": ""
}