Skip to content

Commit c787638

Browse files
committed
Try sourceHasLatestLocally on revision convert
More generalized solution to golang#513.
1 parent 5cdef5e commit c787638

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gps/source.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ func (sg *sourceGateway) listPackages(ctx context.Context, pr ProjectRoot, v Ver
308308
return ptree, nil
309309
}
310310

311-
_, err = sg.require(ctx, sourceIsSetUp|sourceExistsLocally|sourceHasLatestLocally)
311+
_, err = sg.require(ctx, sourceIsSetUp|sourceExistsLocally)
312312
if err != nil {
313313
return pkgtree.PackageTree{}, err
314314
}
@@ -353,7 +353,7 @@ func (sg *sourceGateway) convertToRevision(ctx context.Context, v Version) (Revi
353353

354354
// The version list is out of date; it's possible this version might
355355
// show up after loading it.
356-
_, err := sg.require(ctx, sourceIsSetUp|sourceHasLatestVersionList)
356+
_, err := sg.require(ctx, sourceIsSetUp|sourceHasLatestVersionList|sourceHasLatestLocally)
357357
if err != nil {
358358
return "", err
359359
}

0 commit comments

Comments
 (0)