@@ -66,7 +66,7 @@ func main() {
66
66
Action : func (ctx context.Context , cmd * cli.Command ) error {
67
67
err := updater (string (cmd .String ("token" )), string (cmd .String ("repo" )), cmd .Bool ("commit" ), cmd .Bool ("github-action" ))
68
68
if err != nil {
69
- return fmt .Errorf ("error running updater: %s" , err )
69
+ return fmt .Errorf ("failed to run updater: %s" , err )
70
70
}
71
71
return nil
72
72
},
@@ -152,7 +152,7 @@ func createCommitMessage(updatedDependencies []VersionUpdateInfo, repoPath strin
152
152
} else if ! githubAction {
153
153
cmd := exec .Command ("git" , "commit" , "-am" , commitTitle , "-m" , commitDescription )
154
154
if err := cmd .Run (); err != nil {
155
- return fmt .Errorf ("error running git commit -m: %s" , err )
155
+ return fmt .Errorf ("failed to run git commit -m: %s" , err )
156
156
}
157
157
}
158
158
return nil
@@ -293,7 +293,7 @@ func writeToVersionsJson(repoPath string, dependencies Dependencies) error {
293
293
// formatting json
294
294
updatedJson , err := json .MarshalIndent (dependencies , "" , " " )
295
295
if err != nil {
296
- return fmt .Errorf ("error Marshaling dependencies json: %s" , err )
296
+ return fmt .Errorf ("error marshaling dependencies json: %s" , err )
297
297
}
298
298
299
299
e := os .WriteFile (repoPath + "/versions.json" , updatedJson , 0644 )
@@ -342,20 +342,20 @@ func writeToGithubOutput(title string, description string, repoPath string) erro
342
342
file := os .Getenv ("GITHUB_OUTPUT" )
343
343
f , err := os .OpenFile (file , os .O_APPEND | os .O_CREATE | os .O_WRONLY , 0644 )
344
344
if err != nil {
345
- return fmt .Errorf ("error failed to open GITHUB_OUTPUT file: %s" , err )
345
+ return fmt .Errorf ("failed to open GITHUB_OUTPUT file: %s" , err )
346
346
}
347
347
defer f .Close ()
348
348
349
349
titleToWrite := fmt .Sprintf ("%s=%s\n " , "TITLE" , title )
350
350
_ , err = f .WriteString (titleToWrite )
351
351
if err != nil {
352
- return fmt .Errorf ("error failed to write to GITHUB_OUTPUT file: %s" , err )
352
+ return fmt .Errorf ("failed to write to GITHUB_OUTPUT file: %s" , err )
353
353
}
354
354
355
355
descToWrite := fmt .Sprintf ("%s=%s\n " , "DESC" , description )
356
356
_ , err = f .WriteString (descToWrite )
357
357
if err != nil {
358
- return fmt .Errorf ("error failed to write to GITHUB_OUTPUT file: %s" , err )
358
+ return fmt .Errorf ("failed to write to GITHUB_OUTPUT file: %s" , err )
359
359
}
360
360
361
361
return nil
0 commit comments