File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -253,8 +253,6 @@ tools_call() {
253253}
254254
255255@test ' write_file creates the directory if it does not yet exist' {
256- skip " see https://github.com/lima-vm/lima/issues/4174"
257-
258256 limactl shell " $NAME " rm -rf /tmp/tmp
259257 tools_call write_file ' {"path":"/tmp/tmp/tmp","content":"tmp"}'
260258 json=$output
Original file line number Diff line number Diff line change 99 "io"
1010 "os"
1111 "path"
12+ "path/filepath"
1213
1314 "github.com/modelcontextprotocol/go-sdk/mcp"
1415
@@ -87,6 +88,11 @@ func (ts *ToolSet) WriteFile(_ context.Context,
8788 if err != nil {
8889 return nil , nil , err
8990 }
91+ dir := filepath .Dir (guestPath )
92+ err = ts .sftp .MkdirAll (dir )
93+ if err != nil {
94+ return nil , nil , err
95+ }
9096 f , err := ts .sftp .Create (guestPath )
9197 if err != nil {
9298 return nil , nil , err
You can’t perform that action at this time.
0 commit comments