From 6c422879143fecbd144281db81e3d39670a13d8e Mon Sep 17 00:00:00 2001 From: Roberto Dip Date: Thu, 26 Oct 2023 18:19:59 -0300 Subject: [PATCH] allow to set an orbit destination via env variable (#14658) for #14657. Seems like we're not documenting any of the orbit flags. --- orbit/changes/14657-log-flag | 1 + orbit/cmd/orbit/orbit.go | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 orbit/changes/14657-log-flag diff --git a/orbit/changes/14657-log-flag b/orbit/changes/14657-log-flag new file mode 100644 index 0000000000..497abca02f --- /dev/null +++ b/orbit/changes/14657-log-flag @@ -0,0 +1 @@ +* Allow to configure the orbit `--log-file` flag via an environment variable `ORBIT_LOG_FILE`. diff --git a/orbit/cmd/orbit/orbit.go b/orbit/cmd/orbit/orbit.go index 3e9f56df12..ab11ff51f0 100644 --- a/orbit/cmd/orbit/orbit.go +++ b/orbit/cmd/orbit/orbit.go @@ -144,8 +144,9 @@ func main() { Usage: "Get Orbit version", }, &cli.StringFlag{ - Name: "log-file", - Usage: "Log to this file path in addition to stderr", + Name: "log-file", + Usage: "Log to this file path in addition to stderr", + EnvVars: []string{"ORBIT_LOG_FILE"}, }, &cli.BoolFlag{ Name: "fleet-desktop",