Skip to content

Commit

Permalink
fix: Correct oauth scope check
Browse files Browse the repository at this point in the history
  • Loading branch information
sondrelg committed Jun 24, 2024
1 parent def81c2 commit 4f22ef8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/client/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -460,9 +460,9 @@ impl PackagesClient {
.x_oauth_scopes
.clone()
.unwrap()
.contains("write:packages")
.contains("delete:packages")
{
eprintln!("The token does not have the scopes needed. Tokens need `write:packages`. The scopes found were {}.", response_headers.x_oauth_scopes.unwrap_or("none".to_string()));
eprintln!("The token does not have the scopes needed. Tokens need `delete:packages`. The scopes found were {}.", response_headers.x_oauth_scopes.unwrap_or("none".to_string()));
exit(1);
}
}
Expand Down

0 comments on commit 4f22ef8

Please # to comment.