From ba924386202ff0606f3ab65d593107af7846ac74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nejra=20Selimovi=C4=87?= Date: Sat, 24 Feb 2024 20:35:26 +0100 Subject: [PATCH] doc: Troubleshoot using multiple boolean parameters in CLI cmd (#1276) --- .../interact/cli/troubleshooting/_index.md | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/doc/content/the-things-stack/interact/cli/troubleshooting/_index.md b/doc/content/the-things-stack/interact/cli/troubleshooting/_index.md index a320feb43e..e1f1d86bf0 100644 --- a/doc/content/the-things-stack/interact/cli/troubleshooting/_index.md +++ b/doc/content/the-things-stack/interact/cli/troubleshooting/_index.md @@ -79,3 +79,26 @@ reason=value does not match regex pattern "^[a-z0-9](?:[-]?[a-z0-9]){2,}$" ``` See [ID and EUI Constraints]({{< ref "reference/id-eui-constraints" >}}) section for more info. + +## Setting Multiple Boolean Parameters + +When setting multiple boolean parameters within a CLI command, you need to use the equals (`=`) sign to assign values, otherwise you might be facing errors. + +For example, if you run: + +```bash +ttn-lw-cli gateways set --location-public false --status-public false --auto-update true +``` + +you would be facing the following error: + +```bash +WARN Multiple IDs found in arguments, considering the first +error:cmd/ttn-lw-cli/commands:invalid_gateway_eui (invalid gateway EUI) +``` + +The `--location-public` flag would be interpreted as being `true`, and `false` as an excessive positional argument. Same goes for `--status-public` and `--auto-update` flags as well. In order for all parameters to obtain desired values, you would instead need to run: + +```bash +ttn-lw-cli gateways set --location-public=false --status-public=false --auto-update=true +```