Skip to content
Draft
Changes from all 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: 2 additions & 4 deletions src/commands/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use anyhow::{Context, Result};
use clap::{Parser, Subcommand};
use indicatif::{ProgressBar, ProgressStyle};
use spin_oci::Client;
use std::{io::Read, path::PathBuf, time::Duration};
use std::{path::PathBuf, time::Duration};

/// Commands for working with OCI registries to distribute applications.
#[derive(Subcommand, Debug)]
Expand Down Expand Up @@ -149,10 +149,8 @@ impl Login {
// Otherwise, if the --password flag was passed with a value, use that value. Finally, if
// neither was passed, prompt the user to input the password.
let password = if self.password_stdin {
let mut buf = String::new();
let mut stdin = std::io::stdin().lock();
stdin.read_to_string(&mut buf)?;
buf
rpassword::read_password_from_bufread(&mut stdin)?
} else {
match self.password {
Some(p) => p,
Expand Down