mirror of
https://github.com/Threnklyn/jira.git
synced 2026-06-07 13:33:32 +02:00
only prompt on logout if stdin and stdout are terminals
This commit is contained in:
+1
-1
@@ -32,7 +32,7 @@ func CmdLogoutRegistry() *jiracli.CommandRegistryEntry {
|
|||||||
func CmdLogout(o *oreo.Client, globals *jiracli.GlobalOptions, opts *jiracli.CommonOptions) error {
|
func CmdLogout(o *oreo.Client, globals *jiracli.GlobalOptions, opts *jiracli.CommonOptions) error {
|
||||||
if globals.AuthMethod() == "api-token" {
|
if globals.AuthMethod() == "api-token" {
|
||||||
log.Noticef("No need to logout when using api-token authentication method")
|
log.Noticef("No need to logout when using api-token authentication method")
|
||||||
if globals.GetPass() != "" && terminal.IsTerminal(syscall.Stdin) {
|
if globals.GetPass() != "" && terminal.IsTerminal(syscall.Stdin) && terminal.IsTerminal(syscall.Stdout) {
|
||||||
delete := false
|
delete := false
|
||||||
err := survey.AskOne(
|
err := survey.AskOne(
|
||||||
&survey.Confirm{
|
&survey.Confirm{
|
||||||
|
|||||||
Reference in New Issue
Block a user