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

Commit 69991c7

Browse files
committed
dep: Fix -vendor-only path's invocation ordering
1 parent 0db8f69 commit 69991c7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

cmd/dep/ensure.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,6 @@ func (cmd *ensureCommand) Run(ctx *dep.Ctx, args []string) error {
180180
params.TraceLogger = ctx.Err
181181
}
182182

183-
if cmd.vendorOnly {
184-
return cmd.runVendorOnly(ctx, args, p, sm, params)
185-
}
186-
187183
statchan := make(chan map[string]verify.VendorStatus)
188184
var lps []gps.LockedProject
189185
if p.Lock != nil {
@@ -211,6 +207,10 @@ func (cmd *ensureCommand) Run(ctx *dep.Ctx, args []string) error {
211207
statchan <- status
212208
}(filepath.Join(p.AbsRoot, "vendor"), lps)
213209

210+
if cmd.vendorOnly {
211+
return cmd.runVendorOnly(ctx, args, p, sm, params, statchan)
212+
}
213+
214214
if fatal, err := checkErrors(params.RootPackageTree.Packages, p.Manifest.IgnoredPackages()); err != nil {
215215
if fatal {
216216
return err
@@ -348,7 +348,7 @@ func (cmd *ensureCommand) runVendorOnly(ctx *dep.Ctx, args []string, p *dep.Proj
348348

349349
// Pass the same lock as old and new so that the writer will observe no
350350
// difference, and write out only ncessary vendor/ changes.
351-
dw, err := dep.NewDeltaWriter(p.Lock, p.Lock, <-statchan, p.Manifest.PruneOptions, filepath.Join(p.AbsRoot, "vendor"), VendorAlways)
351+
dw, err := dep.NewDeltaWriter(p.Lock, p.Lock, <-statchan, p.Manifest.PruneOptions, filepath.Join(p.AbsRoot, "vendor"), dep.VendorAlways)
352352
if err != nil {
353353
return err
354354
}

txn_writer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ func (dw *DeltaWriter) PrintPreparedActions(output *log.Logger, verbose bool) er
693693
lpd := dw.lockDiff.ProjectDeltas[pr]
694694
v, id := projs[pr].Version(), projs[pr].Ident()
695695
if reason == projectRemoved {
696-
output.Printf("(%d/%d) Would have removed %s", i, tot, id, v, changeExplanation(reason, lpd))
696+
output.Printf("(%d/%d) Would have removed %s", i, tot, id)
697697
} else {
698698
output.Printf("(%d/%d) Would hae written %s@%s: %s", i, tot, id, v, changeExplanation(reason, lpd))
699699
}

0 commit comments

Comments
 (0)