Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

Commit

Permalink
fix(credential-processs): Remove tty available check (#44)
Browse files Browse the repository at this point in the history
**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
  • Loading branch information
rtkaheller authored Aug 25, 2021
1 parent b3b7fdf commit 6e08761
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions cmd/bmx/bmx_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit 6e08761

Please sign in to comment.