@@ -191,7 +191,7 @@ func mainImplementation(args []string) error {
191191 if cpuprofile != "" {
192192 f , err := os .Create (cpuprofile )
193193 if err != nil {
194- return fmt .Errorf ("couldn't set up cpuprofile file: %s " , err )
194+ return fmt .Errorf ("couldn't set up cpuprofile file: %w " , err )
195195 }
196196 pprof .StartCPUProfile (f )
197197 defer pprof .StopCPUProfile ()
@@ -211,7 +211,7 @@ func mainImplementation(args []string) error {
211211 }
212212
213213 if repoErr != nil {
214- return fmt .Errorf ("couldn't open Git repository: %s " , repoErr )
214+ return fmt .Errorf ("couldn't open Git repository: %w " , repoErr )
215215 }
216216
217217 if jsonOutput {
@@ -270,7 +270,7 @@ func mainImplementation(args []string) error {
270270
271271 historySize , err := sizes .ScanRepositoryUsingGraph (repo , rg , nameStyle , progress )
272272 if err != nil {
273- return fmt .Errorf ("error scanning repository: %s " , err )
273+ return fmt .Errorf ("error scanning repository: %w " , err )
274274 }
275275
276276 if jsonOutput {
@@ -285,7 +285,7 @@ func mainImplementation(args []string) error {
285285 return fmt .Errorf ("JSON version must be 1 or 2" )
286286 }
287287 if err != nil {
288- return fmt .Errorf ("could not convert %v to json: %s " , historySize , err )
288+ return fmt .Errorf ("could not convert %v to json: %w " , historySize , err )
289289 }
290290 fmt .Printf ("%s\n " , j )
291291 } else {
0 commit comments