Skip to content

Commit

Permalink
[xtask] Fix cargo_run for publish command (#1611)
Browse files Browse the repository at this point in the history
  • Loading branch information
syl20bnr committed Apr 12, 2024
1 parent 09d4c70 commit b4ef118
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions xtask/src/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ fn remote_version(crate_name: &str) -> Option<String> {

fn publish(crate_name: String) {
// Perform dry-run to ensure everything is good for publishing
let dry_run_params = Params::from(["publish", "-p", &crate_name, "--dry-run"]);
let dry_run_params = Params::from(["-p", &crate_name, "--dry-run"]);

run_cargo(
"publish",
Expand All @@ -73,13 +73,7 @@ fn publish(crate_name: String) {
let crates_io_token =
env::var(CRATES_IO_API_TOKEN).expect("Failed to retrieve the crates.io API token");
let envs = HashMap::from([("CRATES_IO_API_TOKEN", crates_io_token.clone())]);
let publish_params = Params::from(vec![
"publish",
"-p",
&crate_name,
"--token",
&crates_io_token,
]);
let publish_params = Params::from(vec!["-p", &crate_name, "--token", &crates_io_token]);

// Actually publish the crate
run_cargo(
Expand Down

0 comments on commit b4ef118

Please sign in to comment.