Skip to content

Commit

Permalink
Fixed a bug in "wasmer whoami" where we wouldn't respect the --token …
Browse files Browse the repository at this point in the history
…flag
  • Loading branch information
Michael-F-Bryan committed Jun 28, 2023
1 parent 2294f71 commit b01249e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/cli/src/commands/whoami.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ impl Whoami {
/// Execute `wasmer whoami`
pub fn execute(&self) -> Result<(), anyhow::Error> {
let registry = self.env.registry_endpoint()?;
let token = self.env.token();
let (registry, username) =
wasmer_registry::whoami(self.env.dir(), Some(registry.as_str()), None)?;
wasmer_registry::whoami(self.env.dir(), Some(registry.as_str()), token.as_deref())?;
println!("logged into registry {registry:?} as user {username:?}");
Ok(())
}
Expand Down
1 change: 0 additions & 1 deletion tests/integration/cli/tests/login.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use anyhow::bail;
use assert_cmd::prelude::OutputAssertExt;
use predicates::str::contains;
use tempfile::TempDir;
Expand Down

0 comments on commit b01249e

Please sign in to comment.