Skip to content

Commit 163785a

Browse files
authored
fixed typos and removed print (#521)
* fixed typos and removed print * Update dependency_updater.go
1 parent f988bd0 commit 163785a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

dependency_updater/dependency_updater.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func main() {
6666
Action: func(ctx context.Context, cmd *cli.Command) error {
6767
err := updater(string(cmd.String("token")), string(cmd.String("repo")), cmd.Bool("commit"), cmd.Bool("github-action"))
6868
if err != nil {
69-
return fmt.Errorf("error running updater: %s", err)
69+
return fmt.Errorf("failed to run updater: %s", err)
7070
}
7171
return nil
7272
},
@@ -152,7 +152,7 @@ func createCommitMessage(updatedDependencies []VersionUpdateInfo, repoPath strin
152152
} else if !githubAction {
153153
cmd := exec.Command("git", "commit", "-am", commitTitle, "-m", commitDescription)
154154
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)
156156
}
157157
}
158158
return nil
@@ -293,7 +293,7 @@ func writeToVersionsJson(repoPath string, dependencies Dependencies) error {
293293
// formatting json
294294
updatedJson, err := json.MarshalIndent(dependencies, "", " ")
295295
if err != nil {
296-
return fmt.Errorf("error Marshaling dependencies json: %s", err)
296+
return fmt.Errorf("error marshaling dependencies json: %s", err)
297297
}
298298

299299
e := os.WriteFile(repoPath+"/versions.json", updatedJson, 0644)
@@ -342,20 +342,20 @@ func writeToGithubOutput(title string, description string, repoPath string) erro
342342
file := os.Getenv("GITHUB_OUTPUT")
343343
f, err := os.OpenFile(file, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
344344
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)
346346
}
347347
defer f.Close()
348348

349349
titleToWrite := fmt.Sprintf("%s=%s\n", "TITLE", title)
350350
_, err = f.WriteString(titleToWrite)
351351
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)
353353
}
354354

355355
descToWrite := fmt.Sprintf("%s=%s\n", "DESC", description)
356356
_, err = f.WriteString(descToWrite)
357357
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)
359359
}
360360

361361
return nil

0 commit comments

Comments
 (0)