Skip to content

Commit 0665cd8

Browse files
committed
Handle empty strings for FindLocator
1 parent 993103b commit 0665cd8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/pnp/pnpapi.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,10 @@ func (p *PnpApi) GetPackage(locator *Locator) *PackageInfo {
177177
}
178178

179179
func (p *PnpApi) FindLocator(parentPath string) (*Locator, error) {
180+
if parentPath == "" {
181+
return nil, nil
182+
}
183+
180184
relativePath := tspath.GetRelativePathFromDirectory(p.manifest.dirPath, parentPath,
181185
tspath.ComparePathsOptions{UseCaseSensitiveFileNames: true})
182186

0 commit comments

Comments
 (0)