Skip to content

Commit

Permalink
Fix persistence in config commands
Browse files Browse the repository at this point in the history
  • Loading branch information
janekbaraniewski committed Jul 22, 2023
1 parent 536a209 commit dfe5978
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/issuectl/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func initBackendAddCommand(rootCmd *cobra.Command) {
Short: "Add a new backend",
Args: cobra.ExactArgs(2),
RunE: func(cmd *cobra.Command, args []string) error {
config := issuectl.LoadConfig()
config := issuectl.LoadConfig().GetPersistent()
backendName := args[0]
backendType := args[1]
newBackend := issuectl.BackendConfig{
Expand All @@ -102,7 +102,7 @@ func initBackendDeleteCommand(rootCmd *cobra.Command) {
Short: "Delete a backend",
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
config := issuectl.LoadConfig()
config := issuectl.LoadConfig().GetPersistent()
backendName := args[0]
return config.DeleteBackend(issuectl.BackendConfigName(backendName))
},
Expand Down Expand Up @@ -156,7 +156,7 @@ func initRepoAddCommand(rootCmd *cobra.Command) {
return nil
},
RunE: func(cmd *cobra.Command, args []string) error {
conf := issuectl.LoadConfig()
conf := issuectl.LoadConfig().GetPersistent()
repoConfig := &issuectl.RepoConfig{
Owner: args[0],
Name: issuectl.RepoConfigName(args[1]),
Expand Down Expand Up @@ -209,7 +209,7 @@ func initGitUserAddCommand(rootCmd *cobra.Command) {
Short: "Add a new Git user",
Args: cobra.ExactArgs(3), // Expects exactly 3 arguments
RunE: func(cmd *cobra.Command, args []string) error {
conf := issuectl.LoadConfig()
conf := issuectl.LoadConfig().GetPersistent()
gitUser := &issuectl.GitUser{
Name: issuectl.GitUserName(args[0]),
Email: args[1],
Expand Down

0 comments on commit dfe5978

Please sign in to comment.