From d83f4c753b4e58acd4e9f79a12f15f0fa215817f Mon Sep 17 00:00:00 2001 From: camaeel <12999736+camaeel@users.noreply.github.com> Date: Mon, 21 Oct 2024 21:20:33 +0200 Subject: [PATCH] feat: change browser url output to stderr --- .../proxmox-oidc-credential-helper.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/proxmox-oidc-credential-helper/proxmox-oidc-credential-helper.go b/cmd/proxmox-oidc-credential-helper/proxmox-oidc-credential-helper.go index 7f2da2f..b6890f8 100644 --- a/cmd/proxmox-oidc-credential-helper/proxmox-oidc-credential-helper.go +++ b/cmd/proxmox-oidc-credential-helper/proxmox-oidc-credential-helper.go @@ -71,7 +71,11 @@ func main() { os.Exit(1) } } else { - fmt.Println(browser.PrintableOpenURL(redirectUrl)) + _, err = fmt.Fprintln(os.Stderr, browser.PrintableOpenURL(redirectUrl)) + if err != nil { + slog.Error("Unable to open print link", slog.String("error", err.Error())) + os.Exit(1) + } } select {