Skip to content

Commit 9420c5c

Browse files
hectorj2fluhring
andauthored
chore: allow passing replaces or packages (#20)
* allow passing replaces or packages Signed-off-by: hectorj2f <[email protected]> * Update cmd/gobump/root.go Co-authored-by: Dan Luhring <[email protected]> Signed-off-by: Hector Fernandez <[email protected]> --------- Signed-off-by: hectorj2f <[email protected]> Signed-off-by: Hector Fernandez <[email protected]> Co-authored-by: Dan Luhring <[email protected]>
1 parent 676636f commit 9420c5c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/gobump/root.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ var rootCmd = &cobra.Command{
2929
// Uncomment the following line if your bare application
3030
// has an action associated with it:
3131
RunE: func(cmd *cobra.Command, args []string) error {
32-
if rootFlags.packages == "" {
33-
return fmt.Errorf("Error: No packages provided. Usage: gobump --packages=\"<package1@version> <package2@version> ...\"")
32+
if rootFlags.packages == "" && rootFlags.replaces == "" {
33+
return fmt.Errorf("Error: No packages or replaces provided. Usage: gobump --packages=\"<package1@version> <package2@version> ...\" --replaces=\"<package3=package4@version> ...\"")
3434
}
3535
packages := strings.Split(rootFlags.packages, " ")
3636
pkgVersions := map[string]*types.Package{}

0 commit comments

Comments
 (0)