summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMarkus Pettersson <markus.pettersson@mullvad.net>2023-06-19 10:55:26 +0200
committerMarkus Pettersson <markus.pettersson@mullvad.net>2023-06-21 10:59:33 +0200
commitdc02ea91afbccf6baa221bcce5878d917210ab62 (patch)
tree07034d5b0607885466a4228d653b3fa4899cef31
parentbaf88cd406978204f8cd8a6667ed8356bd87fc3f (diff)
downloadmullvadvpn-dc02ea91afbccf6baa221bcce5878d917210ab62.tar.xz
mullvadvpn-dc02ea91afbccf6baa221bcce5878d917210ab62.zip
Print the old account number even if device is revoked
`mullvad account get` will print the old account number, even when the device has revoked.
-rw-r--r--CHANGELOG.md2
-rw-r--r--mullvad-cli/src/cmds/account.rs3
2 files changed, 5 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 18f27ae646..46019032db 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -38,6 +38,8 @@ Line wrap the file at 100 chars. Th
`mullvad tunnel ipv6 get`.
- Update the CLI multihop settings to make it possible to set the entry location without toggling
multihop on or off.
+- In the CLI, the `mullvad account get` command will now print the account
+ number (if there is one) after the device has been revoked.
#### Windows
- In the CLI, add a unified `mullvad split-tunnel get` command to replace the old commands
diff --git a/mullvad-cli/src/cmds/account.rs b/mullvad-cli/src/cmds/account.rs
index 7faf0856e1..d0da9165fc 100644
--- a/mullvad-cli/src/cmds/account.rs
+++ b/mullvad-cli/src/cmds/account.rs
@@ -127,6 +127,9 @@ impl Account {
}
DeviceState::Revoked => {
println!("{REVOKED_MESSAGE}");
+ if let Some(account_token) = rpc.get_account_history().await? {
+ println!("Mullvad account: {}", account_token);
+ }
}
}