Skip to content

Commit

Permalink
fix broken build
Browse files Browse the repository at this point in the history
  • Loading branch information
ross96D committed Aug 27, 2024
1 parent 7e632f4 commit 8b4e0de
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import (
)

var configurationPath string
var keyPath string
var certPath string

// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
Expand All @@ -19,7 +21,7 @@ var rootCmd = &cobra.Command{
share.Init(configurationPath)
},
Run: func(cmd *cobra.Command, args []string) {
if err := server.New().Start(); err != nil {
if err := server.New(keyPath, certPath).Start(); err != nil {
fmt.Fprintf(os.Stderr, "%s", err.Error())
os.Exit(1)
}
Expand All @@ -38,4 +40,6 @@ func Execute() {
func init() {
rootCmd.Flags().StringVarP(&configurationPath, "config", "c", "config.cue", "set the path to the configuration file")
rootCmd.PersistentFlags().Bool("profile", false, "profile the cpu of the process and creates a file with the content")
rootCmd.PersistentFlags().StringVar(&certPath, "cert", "", "tls certificate path")
rootCmd.PersistentFlags().StringVar(&keyPath, "key", "", "tls key path")
}

0 comments on commit 8b4e0de

Please sign in to comment.