diff --git a/.gitignore b/.gitignore index 3ecec7b..4095e49 100644 --- a/.gitignore +++ b/.gitignore @@ -23,4 +23,6 @@ # Go workspace file go.work -bin* \ No newline at end of file +bin* + +.DS_Store diff --git a/cmd/gobump/root.go b/cmd/gobump/root.go index 9ce308e..655ebfd 100644 --- a/cmd/gobump/root.go +++ b/cmd/gobump/root.go @@ -50,7 +50,7 @@ var rootCmd = &cobra.Command{ return fmt.Errorf("failed to parse bump file %q: %v", rootFlags.bumpFile, err) } } else { - packages := strings.Split(rootFlags.packages, " ") + packages := strings.Fields(rootFlags.packages) for i, pkg := range packages { parts := strings.Split(pkg, "@") if len(parts) != 2 { @@ -64,7 +64,7 @@ var rootCmd = &cobra.Command{ } if len(rootFlags.replaces) != 0 { - replaces := strings.Split(rootFlags.replaces, " ") + replaces := strings.Fields(rootFlags.replaces) for i, replace := range replaces { parts := strings.Split(replace, "=") if len(parts) != 2 {