Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions cli/args/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4644,8 +4644,10 @@ fn no_check_arg() -> Arg {
}

fn connected_arg() -> Arg {
Arg::new("connected")
.long("connected")
Arg::new("tunnel")
.long("tunnel")
.alias("connected")
.short('t')
.hide(true)
.num_args(0..=1)
.require_equals(true)
Expand Down
10 changes: 7 additions & 3 deletions cli/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -914,9 +914,9 @@ async fn auth_tunnel(
) -> Result<String, deno_core::anyhow::Error> {
let mut args = vec!["deploy".to_string(), "tunnel-login".to_string()];

if let Some(token) = env_token {
if let Some(token) = &env_token {
args.push("--token".to_string());
args.push(token);
args.push(token.clone());
}

let mut child = tokio::process::Command::new(env::current_exe()?)
Expand All @@ -928,7 +928,11 @@ async fn auth_tunnel(
deno_runtime::exit(1);
}

Ok(tools::deploy::get_token_entry()?.get_password()?)
if let Some(token) = env_token {
Ok(token)
} else {
Ok(tools::deploy::get_token_entry()?.get_password()?)
}
}

#[allow(clippy::print_stderr)]
Expand Down
Loading