Skip to content

Commit

Permalink
fix: Issue with value assignment in init (ankitpokhrel#606)
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitpokhrel committed Apr 14, 2023
1 parent eef7ae9 commit 60e883a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions internal/config/generator.go
Expand Up @@ -190,6 +190,7 @@ func (c *JiraCLIConfigGenerator) configureInstallationType() error {
return nil
}

//nolint:gocyclo
func (c *JiraCLIConfigGenerator) configureServerAndLoginDetails() error {
var qs []*survey.Question

Expand Down Expand Up @@ -288,8 +289,12 @@ func (c *JiraCLIConfigGenerator) configureServerAndLoginDetails() error {
return err
}

c.value.server = ans.Server
c.value.login = ans.Login
if ans.Server != "" {
c.value.server = ans.Server
}
if ans.Login != "" {
c.value.login = ans.Login
}
}

return c.verifyLoginDetails(c.value.server, c.value.login)
Expand Down

0 comments on commit 60e883a

Please sign in to comment.