From ccba416e85a5e575d812db7ecc2e4f0bed187875 Mon Sep 17 00:00:00 2001 From: jolheiser Date: Wed, 9 Sep 2020 10:25:13 -0500 Subject: [PATCH] Env vars for a few CLI options Signed-off-by: jolheiser --- src/cli/cli.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cli/cli.go b/src/cli/cli.go index 31759c6..2293be8 100644 --- a/src/cli/cli.go +++ b/src/cli/cli.go @@ -80,10 +80,10 @@ func Run() (err error) { &cli.BoolFlag{Name: "stdout", Usage: "redirect file to stdout"}, &cli.BoolFlag{Name: "no-compress", Usage: "disable compression"}, &cli.BoolFlag{Name: "ask", Usage: "make sure sender and recipient are prompted"}, - &cli.StringFlag{Name: "relay", Value: models.DEFAULT_RELAY, Usage: "address of the relay"}, - &cli.StringFlag{Name: "relay6", Value: models.DEFAULT_RELAY6, Usage: "ipv6 address of the relay"}, + &cli.StringFlag{Name: "relay", Value: models.DEFAULT_RELAY, Usage: "address of the relay", EnvVars: []string{"CROC_RELAY"}}, + &cli.StringFlag{Name: "relay6", Value: models.DEFAULT_RELAY6, Usage: "ipv6 address of the relay", EnvVars: []string{"CROC_RELAY6"}}, &cli.StringFlag{Name: "out", Value: ".", Usage: "specify an output folder to receive the file"}, - &cli.StringFlag{Name: "pass", Value: "pass123", Usage: "password for the relay"}, + &cli.StringFlag{Name: "pass", Value: "pass123", Usage: "password for the relay", EnvVars: []string{"CROC_PASS"}}, } app.EnableBashCompletion = true app.HideHelp = false