Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions hack/bats/tests/mcp.bats
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,7 @@ tools_call() {
}

@test 'glob returns an empty list when the pattern does not match' {
skip "see https://github.com/lima-vm/lima/issues/4173"


tools_call glob '{"pattern":"nothing.to.see"}'

run_yq '.structuredContent.matches[]' <<<"$output"
Expand Down
3 changes: 3 additions & 0 deletions pkg/mcp/toolset/filesystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ func (ts *ToolSet) Glob(_ context.Context,
}
pattern := path.Join(guestPath, args.Pattern)
matches, err := ts.sftp.Glob(pattern)
if matches == nil {
matches = []string{}
}
if err != nil {
return nil, nil, err
}
Expand Down
Loading