Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Commit

Permalink
gps: Supervise git cleanup, use new ct constant
Browse files Browse the repository at this point in the history
  • Loading branch information
sdboyer committed Oct 17, 2017
1 parent d3d9967 commit d596e65
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions internal/gps/maybe_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,11 @@ func (m maybeGitSource) try(ctx context.Context, cachedir string, c singleSource
if r.CheckLocal() {
state |= sourceExistsLocally

// If repository already exists on disk, make a pass to be sure
// everything's clean.
if err = src.cleanup(ctx); err != nil {
if err := superv.do(ctx, "git", ctValidateLocal, func(ctx context.Context) error {
// If repository already exists on disk, make a pass to be sure
// everything's clean.
return src.cleanup(ctx)
}); err != nil {
return nil, 0, err
}
}
Expand Down
1 change: 1 addition & 0 deletions internal/gps/source_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,7 @@ const (
ctSourceInit
ctSourceFetch
ctExportTree
ctValidateLocal
)

func (ct callType) String() string {
Expand Down

0 comments on commit d596e65

Please sign in to comment.