Skip to content

Commit 25f4550

Browse files
committed
fix(workspace): treat metadata file as valid marker to avoid unindexable markerless spaces
1 parent b55c336 commit 25f4550

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

pkg/workspace/detector/detector.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,20 @@ func (d *Detector) inspectDir(dir string) (*contract.WorkspaceCandidate, *contra
185185
markers = append(markers, marker)
186186
}
187187
}
188+
189+
if d.opts.MetadataFileName != "" {
190+
found := false
191+
for _, m := range markers {
192+
if m == d.opts.MetadataFileName {
193+
found = true
194+
break
195+
}
196+
}
197+
if !found && exists(filepath.Join(dir, d.opts.MetadataFileName)) {
198+
markers = append(markers, d.opts.MetadataFileName)
199+
}
200+
}
201+
188202
if len(markers) == 0 {
189203
return nil, nil
190204
}

0 commit comments

Comments
 (0)