mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-24 16:01:42 +00:00
fix(cli): improve tty handling
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ import { colors, getAvailablePort, log, open, Secret, Select } from "./deps.ts";
|
||||
|
||||
export async function loginInteractive(remote: string) {
|
||||
let token: string | undefined;
|
||||
if (!Deno.stdin.isTerminal()) {
|
||||
if (Deno.stdin.isTerminal && !Deno.stdin.isTerminal()) {
|
||||
log.info("Not a TTY, can't login interactively.");
|
||||
return undefined;
|
||||
}
|
||||
|
||||
+1
-1
@@ -210,7 +210,7 @@ export async function add(
|
||||
remote = new URL(remote).toString(); // add trailing slash in all cases!
|
||||
|
||||
let token = await tryGetLoginInfo(opts);
|
||||
if (!token && !Deno.stdin.isTerminal()) {
|
||||
if (!token && Deno.stdin.isTerminal && !Deno.stdin.isTerminal()) {
|
||||
log.info("Not a TTY, can't login interactively. Pass the token in --token");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user