Skip to content

Commit 59a03b3

Browse files
authored
rerun auth token: print newline (#11420)
1 parent 2646096 commit 59a03b3

File tree

1 file changed

+2
-3
lines changed
  • crates/utils/re_auth/src

1 file changed

+2
-3
lines changed

crates/utils/re_auth/src/cli.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ struct NoCredentialsError;
6363
#[error("Your credentials are expired, run `rerun auth login` first")]
6464
struct ExpiredCredentialsError;
6565

66+
/// Prints the token to stdout
6667
pub async fn token(context: &AuthContext) -> Result<(), Error> {
6768
let mut credentials = match workos::Credentials::load() {
6869
Ok(Some(credentials)) => credentials,
@@ -88,9 +89,7 @@ pub async fn token(context: &AuthContext) -> Result<(), Error> {
8889
unreachable!("bug: no access token after refresh");
8990
};
9091

91-
use std::io::Write as _;
92-
let mut stdout = std::io::stdout();
93-
write!(stdout, "{}", token.as_str()).ok();
92+
println!("{}", token.as_str());
9493

9594
Ok(())
9695
}

0 commit comments

Comments
 (0)