Skip to content

Commit

Permalink
fix: address comment
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Sturc <psturc@redhat.com>
  • Loading branch information
psturc committed Oct 24, 2023
1 parent 40e7663 commit 44bc1a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion cmd/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (

var (
backend string
backends string
password string
baseURL string
model string
Expand Down
6 changes: 3 additions & 3 deletions cmd/auth/remove.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ var removeCmd = &cobra.Command{
_ = cmd.MarkFlagRequired("backends")
},
Run: func(cmd *cobra.Command, args []string) {
if backends == "" {
if backend == "" {
color.Red("Error: backends must be set.")
_ = cmd.Help()
return
}
inputBackends := strings.Split(backends, ",")
inputBackends := strings.Split(backend, ",")

err := viper.UnmarshalKey("ai", &configAI)
if err != nil {
Expand Down Expand Up @@ -73,5 +73,5 @@ var removeCmd = &cobra.Command{

func init() {
// add flag for backends
removeCmd.Flags().StringVarP(&backends, "backends", "b", "", "Backend AI providers to remove (separated by a comma)")
removeCmd.Flags().StringVarP(&backend, "backends", "b", "", "Backend AI providers to remove (separated by a comma)")
}

0 comments on commit 44bc1a2

Please sign in to comment.