Skip to content

Commit

Permalink
fix flag for configure cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
schoren committed Jul 25, 2024
1 parent ec2f67b commit 988243b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion cli/cmd/configure_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ var configureCmd = &cobra.Command{
PreRun: setupLogger,
Run: WithResultHandler(WithParamsHandler(configParams)(func(ctx context.Context, cmd *cobra.Command, _ []string) (string, error) {
flags := agentConfig.Flags{
CI: configParams.CI,
CI: configParams.CI,
SkipVerify: cliConfig.SkipVerify,
}

config, err := config.LoadConfig("")
Expand Down
1 change: 1 addition & 0 deletions cli/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ func init() {
rootCmd.PersistentFlags().StringVarP(&configFile, "config", "c", "config.yml", "config file will be used by the CLI")
rootCmd.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "display debug information")
rootCmd.PersistentFlags().StringVarP(&overrideEndpoint, "server-url", "s", "", "server url")
rootCmd.PersistentFlags().BoolVarP(&cliConfig.SkipVerify, "skip-verify", "", false, "skip verification of the server certificate (allows self signed, for example)")

groups := []*cobra.Group{cmdGroupConfig, cmdGroupResources, cmdGroupMisc}

Expand Down
4 changes: 1 addition & 3 deletions cli/cmd/start_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var startCmd = &cobra.Command{
LogLevel: startParams.logLevel,
CollectorEndpoint: startParams.collectorEndpoint,
Insecure: startParams.insecure,
SkipVerify: startParams.skipVerify,
SkipVerify: cliConfig.SkipVerify,
}

// override organization and environment id from context.
Expand Down Expand Up @@ -92,7 +92,6 @@ func init() {
startCmd.Flags().StringVarP(&startParams.logLevel, "log-level", "l", "debug", "set the agent log level")
startCmd.Flags().StringVarP(&startParams.collectorEndpoint, "collector-endpoint", "", "", "address of the OTel Collector endpoint")
startCmd.Flags().BoolVarP(&startParams.insecure, "insecure", "", false, "allow insecure connections to control plane")
startCmd.Flags().BoolVarP(&startParams.skipVerify, "skip-verify", "", false, "skip verification of the server certificate (allows self signed, for example)")

startCmd.Flags().MarkDeprecated("endpoint", "use --server-url instead")
startCmd.Flags().MarkShorthandDeprecated("e", "use --server-url instead")
Expand All @@ -109,5 +108,4 @@ type startParameters struct {
logLevel string
collectorEndpoint string
insecure bool
skipVerify bool
}

0 comments on commit 988243b

Please sign in to comment.