[fix] bugfixes from testing
- sqlite wrapper func context bug
This commit is contained in:
@@ -5,6 +5,7 @@ package server
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"code.jakeyoungdev.com/jake/mctl/database"
|
||||
"github.com/spf13/cobra"
|
||||
@@ -21,6 +22,8 @@ var activeCmd = &cobra.Command{
|
||||
|
||||
err = db.SetActiveServer(args[0])
|
||||
cobra.CheckErr(err)
|
||||
|
||||
fmt.Println("Active server updated")
|
||||
},
|
||||
PreRunE: func(cmd *cobra.Command, args []string) error {
|
||||
if len(args) == 0 {
|
||||
|
@@ -47,6 +47,7 @@ var addCmd = &cobra.Command{
|
||||
fmt.Printf("Password: ")
|
||||
ps, err := term.ReadPassword(int(os.Stdin.Fd()))
|
||||
cobra.CheckErr(err)
|
||||
fmt.Println()
|
||||
|
||||
db, err := database.New()
|
||||
cobra.CheckErr(err)
|
||||
|
@@ -28,7 +28,7 @@ var viewCmd = &cobra.Command{
|
||||
fmt.Printf("Address: %s\n", s.Server)
|
||||
fmt.Printf("Port: %d\n", s.Port)
|
||||
fmt.Println("Password: [REDACTED]")
|
||||
fmt.Printf("Default: %t\n", s.Default)
|
||||
fmt.Printf("Default: %t\n", s.Active)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user