mirror of https://github.com/status-im/consul.git
Merge pull request #2918 from hashicorp/pr-2577-slackpad
Provide error if -ui and -ui-dir are both specified
This commit is contained in:
commit
d3ae23fa52
|
@ -424,6 +424,13 @@ func (c *Command) readConfig() *Config {
|
|||
// Verify the node metadata entries are valid
|
||||
if err := structs.ValidateMetadata(config.Meta); err != nil {
|
||||
c.Ui.Error(fmt.Sprintf("Failed to parse node metadata: %v", err))
|
||||
}
|
||||
|
||||
// It doesn't make sense to include both UI options.
|
||||
if config.EnableUi == true && config.UiDir != "" {
|
||||
c.Ui.Error("Both the ui and ui-dir flags were specified, please provide only one")
|
||||
c.Ui.Error("If trying to use your own web UI resources, use the ui-dir flag")
|
||||
c.Ui.Error("If using Consul version 0.7.0 or later, the web UI is included in the binary so use ui to enable it")
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -362,7 +362,7 @@ will exit with an error at startup.
|
|||
|
||||
* <a name="_ui_dir"></a><a href="#_ui_dir">`-ui-dir`</a> - This flag provides the directory containing
|
||||
the Web UI resources for Consul. This will automatically enable the Web UI. The directory must be
|
||||
readable to the agent. Starting with Consul version 0.7.0 and later, the Web UI assets are included in the binary so this flag is no longer necessary; specifying only the `-ui` flag is enough to enable the Web UI.
|
||||
readable to the agent. Starting with Consul version 0.7.0 and later, the Web UI assets are included in the binary so this flag is no longer necessary; specifying only the `-ui` flag is enough to enable the Web UI. Specifying both the '-ui' and '-ui-dir' flags will result in an error.
|
||||
|
||||
## <a name="configuration_files"></a>Configuration Files
|
||||
|
||||
|
@ -1055,7 +1055,7 @@ Consul will not enable TLS for the HTTP API unless the `https` port has been ass
|
|||
command-line flag.
|
||||
|
||||
* <a name="ui_dir"></a><a href="#ui_dir">`ui_dir`</a> - Equivalent to the
|
||||
[`-ui-dir`](#_ui_dir) command-line flag. This configuration key is not required as of Consul version 0.7.0 and later.
|
||||
[`-ui-dir`](#_ui_dir) command-line flag. This configuration key is not required as of Consul version 0.7.0 and later. Specifying this configuration key will enable the web UI. There is no need to specify both ui-dir and ui. Specifying both will result in an error.
|
||||
|
||||
* <a name="unix_sockets"></a><a href="#unix_sockets">`unix_sockets`</a> - This
|
||||
allows tuning the ownership and permissions of the
|
||||
|
|
Loading…
Reference in New Issue