Skip to content

Commit

Permalink
refactor: do not tell about claim token when not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-yantsen committed Mar 12, 2023
1 parent 685581e commit 105a2e3
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions crates/xtask/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,13 @@ impl flags::Test {
)
.run()?;

print!("// Requesting claim token... ");
let _ = std::io::stdout().flush();

let server_owner_token = self.server_owner_token.as_ref().unwrap_or(token);

if !server_owner_token.is_empty() {
print!("// Requesting claim token... ");
let _ = std::io::stdout().flush();
}

Runtime::new()?.block_on(async {
let claim_token = if server_owner_token.is_empty() {
"".to_string()
Expand All @@ -92,8 +94,10 @@ impl flags::Test {
.to_string()
};

println!("done!");
let _ = std::io::stdout().flush();
if !server_owner_token.is_empty() {
println!("done!");
let _ = std::io::stdout().flush();
}

self.integration_tests(
sh,
Expand Down

0 comments on commit 105a2e3

Please sign in to comment.