Skip to content

Commit

Permalink
fix(cli): CLI do not exit with 0 on pull when branch does not exist (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
BlumMichael authored Jan 15, 2025
1 parent 05e5ced commit e7d8c43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion clients/cli/cmd/internal/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (cmd *PullCommand) Run(config *phrase.Config) error {
val, ok := localesCache[LocalesCacheKey{target.ProjectID, target.GetBranch()}]
if !ok || len(val) == 0 {
if cmd.Branch != "" {
continue
return fmt.Errorf("Branch '%s' does not exist in project '%s'", cmd.Branch, target.ProjectID)
}
return fmt.Errorf("Could not find any locales for project %q", target.ProjectID)
}
Expand Down
2 changes: 1 addition & 1 deletion clients/cli/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/daviddengcn/go-colortext v1.0.0
github.com/jpillora/backoff v1.0.0
github.com/mitchellh/mapstructure v1.5.0
github.com/phrase/phrase-go/v4 v4.0.5 // x-release-please-version
github.com/phrase/phrase-go/v4 v4.1.0 // x-release-please-version
github.com/spf13/cobra v1.8.1
github.com/spf13/viper v1.19.0
gopkg.in/yaml.v2 v2.4.0
Expand Down

0 comments on commit e7d8c43

Please sign in to comment.