@@ -146,10 +146,7 @@ func testRunnerAssetCommandAction(cmd *cobra.Command, args []string) error {
146
146
return cobraext .FlagParsingError (fmt .Errorf ("coverage format not available: %s" , testCoverageFormat ), cobraext .TestCoverageFormatFlagName )
147
147
}
148
148
149
- packageRootPath , found , err := packages .FindPackageRoot ()
150
- if ! found {
151
- return errors .New ("package root not found" )
152
- }
149
+ packageRootPath , err := packages .FindPackageRoot ()
153
150
if err != nil {
154
151
return fmt .Errorf ("locating package root failed: %w" , err )
155
152
}
@@ -242,10 +239,7 @@ func testRunnerStaticCommandAction(cmd *cobra.Command, args []string) error {
242
239
return cobraext .FlagParsingError (fmt .Errorf ("coverage format not available: %s" , testCoverageFormat ), cobraext .TestCoverageFormatFlagName )
243
240
}
244
241
245
- packageRootPath , found , err := packages .FindPackageRoot ()
246
- if ! found {
247
- return errors .New ("package root not found" )
248
- }
242
+ packageRootPath , err := packages .FindPackageRoot ()
249
243
if err != nil {
250
244
return fmt .Errorf ("locating package root failed: %w" , err )
251
245
}
@@ -349,10 +343,7 @@ func testRunnerPipelineCommandAction(cmd *cobra.Command, args []string) error {
349
343
return cobraext .FlagParsingError (err , cobraext .DeferCleanupFlagName )
350
344
}
351
345
352
- packageRootPath , found , err := packages .FindPackageRoot ()
353
- if ! found {
354
- return errors .New ("package root not found" )
355
- }
346
+ packageRootPath , err := packages .FindPackageRoot ()
356
347
if err != nil {
357
348
return fmt .Errorf ("locating package root failed: %w" , err )
358
349
}
@@ -493,10 +484,7 @@ func testRunnerSystemCommandAction(cmd *cobra.Command, args []string) error {
493
484
return cobraext .FlagParsingError (err , cobraext .VariantFlagName )
494
485
}
495
486
496
- packageRootPath , found , err := packages .FindPackageRoot ()
497
- if ! found {
498
- return errors .New ("package root not found" )
499
- }
487
+ packageRootPath , err := packages .FindPackageRoot ()
500
488
if err != nil {
501
489
return fmt .Errorf ("locating package root failed: %w" , err )
502
490
}
@@ -664,10 +652,7 @@ func testRunnerPolicyCommandAction(cmd *cobra.Command, args []string) error {
664
652
return cobraext .FlagParsingError (fmt .Errorf ("coverage format not available: %s" , testCoverageFormat ), cobraext .TestCoverageFormatFlagName )
665
653
}
666
654
667
- packageRootPath , found , err := packages .FindPackageRoot ()
668
- if ! found {
669
- return errors .New ("package root not found" )
670
- }
655
+ packageRootPath , err := packages .FindPackageRoot ()
671
656
if err != nil {
672
657
return fmt .Errorf ("locating package root failed: %w" , err )
673
658
}
0 commit comments