From df9fe7f8d0831460da2dde7e191b9cfda6dd0565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Fri, 21 Oct 2022 19:45:35 +0200 Subject: [PATCH] Allow reasding subscribe credentials from NTFY_USER env --- cmd/subscribe.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/subscribe.go b/cmd/subscribe.go index d916654..7bfb612 100644 --- a/cmd/subscribe.go +++ b/cmd/subscribe.go @@ -29,7 +29,7 @@ var flagsSubscribe = append( flagsDefault, &cli.StringFlag{Name: "config", Aliases: []string{"c"}, Usage: "client config file"}, &cli.StringFlag{Name: "since", Aliases: []string{"s"}, Usage: "return events since `SINCE` (Unix timestamp, or all)"}, - &cli.StringFlag{Name: "user", Aliases: []string{"u"}, Usage: "username[:password] used to auth against the server"}, + &cli.StringFlag{Name: "user", Aliases: []string{"u"}, EnvVars: []string{"NTFY_USER"}, Usage: "username[:password] used to auth against the server"}, &cli.BoolFlag{Name: "from-config", Aliases: []string{"from_config", "C"}, Usage: "read subscriptions from config file (service mode)"}, &cli.BoolFlag{Name: "poll", Aliases: []string{"p"}, Usage: "return events and exit, do not listen for new events"}, &cli.BoolFlag{Name: "scheduled", Aliases: []string{"sched", "S"}, Usage: "also return scheduled/delayed events"},