Skip to content

Commit e7d8c43

Browse files
authored
fix(cli): CLI do not exit with 0 on pull when branch does not exist (#768)
1 parent 05e5ced commit e7d8c43

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clients/cli/cmd/internal/pull.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func (cmd *PullCommand) Run(config *phrase.Config) error {
7171
val, ok := localesCache[LocalesCacheKey{target.ProjectID, target.GetBranch()}]
7272
if !ok || len(val) == 0 {
7373
if cmd.Branch != "" {
74-
continue
74+
return fmt.Errorf("Branch '%s' does not exist in project '%s'", cmd.Branch, target.ProjectID)
7575
}
7676
return fmt.Errorf("Could not find any locales for project %q", target.ProjectID)
7777
}

clients/cli/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111
github.com/daviddengcn/go-colortext v1.0.0
1212
github.com/jpillora/backoff v1.0.0
1313
github.com/mitchellh/mapstructure v1.5.0
14-
github.com/phrase/phrase-go/v4 v4.0.5 // x-release-please-version
14+
github.com/phrase/phrase-go/v4 v4.1.0 // x-release-please-version
1515
github.com/spf13/cobra v1.8.1
1616
github.com/spf13/viper v1.19.0
1717
gopkg.in/yaml.v2 v2.4.0

0 commit comments

Comments
 (0)