Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
Songmu committed Aug 20, 2022
1 parent 50f2bd1 commit ce2f76b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func newConfig(gitPath string) (*config, error) {
}
} else {
out, err := cfg.gitconfig.Get(configReleaseBranch)
if err != nil {
if err == nil {
cfg.releaseBranch = &configValue{
value: out,
source: srcConfigFile,
Expand All @@ -73,7 +73,7 @@ func newConfig(gitPath string) (*config, error) {
}
} else {
out, err := cfg.gitconfig.Get(configVersionFile)
if err != nil {
if err == nil {
cfg.releaseBranch = &configValue{
value: out,
source: srcConfigFile,
Expand All @@ -89,7 +89,7 @@ func newConfig(gitPath string) (*config, error) {
cfg.vPrefix = github.Bool(b)
} else {
b, err := cfg.gitconfig.Bool(configVPrefix)
if err != nil {
if err == nil {
cfg.vPrefix = github.Bool(b)
}
}
Expand Down
4 changes: 3 additions & 1 deletion rcpr.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ func Run(ctx context.Context, argv []string, outStream, errStream io.Writer) err
}

if rp.cfg.vPrefix == nil {
rp.cfg.SetVPrefix(currVer.vPrefix)
if err := rp.cfg.SetVPrefix(currVer.vPrefix); err != nil {
return err
}
} else {
currVer.vPrefix = *rp.cfg.vPrefix
}
Expand Down

0 comments on commit ce2f76b

Please sign in to comment.