Files
filebrowser/cmd/config_cat.go
T

32 lines
607 B
Go
Raw Normal View History

2019-01-05 22:44:33 +00:00
package cmd
import (
"github.com/spf13/cobra"
)
func init() {
configCmd.AddCommand(configCatCmd)
}
var configCatCmd = &cobra.Command{
Use: "cat",
Short: "Prints the configuration",
Long: `Prints the configuration.`,
Args: cobra.NoArgs,
2025-11-18 11:29:28 +01:00
RunE: withStore(func(_ *cobra.Command, _ []string, st *store) error {
set, err := st.Settings.Get()
if err != nil {
return err
}
2025-11-18 11:29:28 +01:00
ser, err := st.Settings.GetServer()
if err != nil {
return err
}
2025-11-18 11:29:28 +01:00
auther, err := st.Auth.Get(set.AuthMethod)
if err != nil {
return err
}
return printSettings(ser, set, auther)
2025-11-18 11:29:28 +01:00
}, storeOptions{}),
2019-01-05 22:44:33 +00:00
}