diff --git a/README.md b/README.md index 08453901f262877cd6a8a0d53dd155927eddb1d8..89734693ba2a9974a214105edd1093ca35ea7cad 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,20 @@ You can download one of the pre-compiled binaries from the list below. - [Windows (32-bit)](http://s3.hedenstroem.com/utils/udm-query/udm-query-windows-i386.exe) - [Windows (64-bit)](http://s3.hedenstroem.com/utils/udm-query/udm-query-windows-x64.exe) +## Configuration + +To avoid providing the password via a flag every time, you can define an environment variable named `SSH_PASSWORD` instead. The address to the UDM can also be set in the environment variable `SSH_ADDRESS`. + +If you prefer you can also set these values in a `.env` file like this: + +```env +SSH_ADDRESS=192.168.1.1 +SSH_PASSWORD=mypassword +``` ## Usage ```bash > udm-query help ``` + +See the [generated documentation]((https://gitlab.hedenstroem.com/go/udm-query/-/blob/main/docs/udm-query.md)) for more information about the various commands. diff --git a/cmd/root.go b/cmd/root.go index 843d77bb385a6f2cf71abfdc6a2bf49ccec62910..ff1dfe8c4729d75586dce5fa780290c785218744 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -54,7 +54,6 @@ var RootCmd = &cobra.Command{ func Execute() { if err := RootCmd.Execute(); err != nil { - fmt.Println(err) os.Exit(-1) } }