From 4b19daceda80fb08ea55ebaf9e6ff7aabb3eae61 Mon Sep 17 00:00:00 2001 From: Andy Heller Date: Mon, 23 Aug 2021 11:48:30 -0400 Subject: [PATCH] fix(credential-processs): Remove tty available check **Description:** Rather than check for the ability to create a tty connection and failing if we can't, continue as if we have one. In the case where we have a valid session, we don't need the tty, so the credential-process command will continue to work. If we need to use the tty (because no valid session), we already are raising an error, so let it fail then. **Testing:** `bazel test //...` and manually testing locally --- cmd/bmx/bmx_default.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/cmd/bmx/bmx_default.go b/cmd/bmx/bmx_default.go index a6a4670..f1612c0 100644 --- a/cmd/bmx/bmx_default.go +++ b/cmd/bmx/bmx_default.go @@ -3,20 +3,11 @@ package main import ( - "log" "github.com/rtkwlf/bmx/config" "github.com/rtkwlf/bmx/console" ) func selectConsoleReader(userConfig config.UserConfig, limited bool) console.ConsoleReader { - if !limited { - return console.NewConsoleReader(false) - } - - if !console.IsTtyAvailable() { - log.Fatal("Cannot create tty connection for writing output") - } - - return console.NewConsoleReader(true) + return console.NewConsoleReader(limited) }