Skip to content

Commit

Permalink
feat: add --check flag to the update command
Browse files Browse the repository at this point in the history
  • Loading branch information
hanshal101 authored and hanshal101 committed Jul 3, 2024
1 parent 4b0b202 commit 4ea5e68
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/update/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func parsePackagesForUpdates(versionMap map[string]*buildsafev1.FetchPackagesRes
name, version := update.ParsePackage(k)

if !semver.IsValid("v" + version) {
fmt.Println(styles.WarnStyle.Render("Warning: skipping", k, "as only semver updates are supported currently"))
fmt.Println(styles.WarnStyle.Render("warning:", "skipping ", k, " as only semver updates are supported currently"))
newVersions = append(newVersions, k)
continue
}
Expand Down Expand Up @@ -179,7 +179,7 @@ func fetchPackageVersions(packages []string, sc buildsafev1.SearchServiceClient)
for _, pkg := range packages {
name, version := update.ParsePackage(pkg)
if name == "" || version == "" {
fmt.Println(styles.ErrorStyle.Render("Error:", "invalid package name or version"))
fmt.Println(styles.ErrorStyle.Render("error:", "invalid package name or version"))
continue
}

Expand All @@ -190,7 +190,7 @@ func fetchPackageVersions(packages []string, sc buildsafev1.SearchServiceClient)
Name: name,
})
if err != nil {
fmt.Println(styles.ErrorStyle.Render("Error finding", name+":", err.Error()))
fmt.Println(styles.ErrorStyle.Render("error finding ", name, ":", err.Error()))
return
}

Expand Down

0 comments on commit 4ea5e68

Please sign in to comment.