@@ -215,22 +215,22 @@ func (cmd *statusCommand) Run(ctx *dep.Ctx, args []string) error {
215
215
}
216
216
}
217
217
218
- digestMismatch , hasMissingPkgs , err := runStatusAll (ctx . Loggers , out , p , sm )
218
+ digestMismatch , hasMissingPkgs , err := runStatusAll (ctx , out , p , sm )
219
219
if err != nil {
220
220
return err
221
221
}
222
222
223
223
if digestMismatch {
224
224
if hasMissingPkgs {
225
- ctx .Loggers . Err .Printf ("Lock inputs-digest mismatch due to the following packages missing from the lock:\n \n " )
226
- ctx .Loggers . Out .Print (buf .String ())
227
- ctx .Loggers . Err .Printf ("\n This happens when a new import is added. Run `dep ensure` to install the missing packages.\n " )
225
+ ctx .Err .Printf ("Lock inputs-digest mismatch due to the following packages missing from the lock:\n \n " )
226
+ ctx .Out .Print (buf .String ())
227
+ ctx .Err .Printf ("\n This happens when a new import is added. Run `dep ensure` to install the missing packages.\n " )
228
228
} else {
229
- ctx .Loggers . Err .Printf ("Lock inputs-digest mismatch. This happens when Gopkg.toml is modified.\n " +
229
+ ctx .Err .Printf ("Lock inputs-digest mismatch. This happens when Gopkg.toml is modified.\n " +
230
230
"Run `dep ensure` to regenerate the inputs-digest." )
231
231
}
232
232
} else {
233
- ctx .Loggers . Out .Print (buf .String ())
233
+ ctx .Out .Print (buf .String ())
234
234
}
235
235
236
236
return nil
@@ -253,7 +253,7 @@ type MissingStatus struct {
253
253
MissingPackages []string
254
254
}
255
255
256
- func runStatusAll (loggers * dep.Loggers , out outputter , p * dep.Project , sm gps.SourceManager ) (bool , bool , error ) {
256
+ func runStatusAll (ctx * dep.Ctx , out outputter , p * dep.Project , sm gps.SourceManager ) (bool , bool , error ) {
257
257
var digestMismatch , hasMissingPkgs bool
258
258
259
259
if p .Lock == nil {
@@ -276,8 +276,8 @@ func runStatusAll(loggers *dep.Loggers, out outputter, p *dep.Project, sm gps.So
276
276
Manifest : p .Manifest ,
277
277
// Locks aren't a part of the input hash check, so we can omit it.
278
278
}
279
- if loggers .Verbose {
280
- params .TraceLogger = loggers .Err
279
+ if ctx .Verbose {
280
+ params .TraceLogger = ctx .Err
281
281
}
282
282
283
283
s , err := gps .Prepare (params , sm )
@@ -412,9 +412,9 @@ func runStatusAll(loggers *dep.Loggers, out outputter, p *dep.Project, sm gps.So
412
412
// TODO this is just a fix quick so staticcheck doesn't complain.
413
413
// Visually reconciling failure to deduce project roots with the rest of
414
414
// the mismatch output is a larger problem.
415
- loggers .Err .Printf ("Failed to deduce project roots for import paths:\n " )
415
+ ctx .Err .Printf ("Failed to deduce project roots for import paths:\n " )
416
416
for _ , fail := range errs {
417
- loggers .Err .Printf ("\t %s: %s\n " , fail .ex , fail .err .Error ())
417
+ ctx .Err .Printf ("\t %s: %s\n " , fail .ex , fail .err .Error ())
418
418
}
419
419
420
420
return digestMismatch , hasMissingPkgs , errors .New ("address issues with undeducible import paths to get more status information" )
0 commit comments