Skip to content

Commit a14305c

Browse files
fix(xtask): Pass --no-confirm to cargo-release (#162)
This fixes a bug where the `release` task would try to prompt the user to confirm, and then fail (without rollback happening) because it's actually running in a non-interactive context. This _does_ mean that when `--execute` is passed, it will really publish a new version! So take care. Signed-off-by: Andrew Lilley Brinker <alilleybrinker@gmail.com>
1 parent 49b91a6 commit a14305c

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

xtask/src/release.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -345,15 +345,8 @@ impl Step for ReleaseCrate {
345345
let sh = Shell::new()?;
346346
let krate = self.krate.name();
347347
let bump = self.bump.to_string();
348-
let execute = self.execute.then_some("--execute");
349-
350-
// TODO(alilleybrinker): It currently looks like this fails on networks
351-
// which substitute in their own certificates,
352-
// because Cargo is unable to validate the certificate.
353-
// I believe this is because of how `xshell` isolates
354-
// commands, which may be causing Cargo _not_ to pickup
355-
// relevant configuration which would otherwise enable
356-
// it to work on such a network.
348+
let execute = self.execute.then_some("--execute --no-confirm");
349+
357350
cmd!(
358351
sh,
359352
"cargo release -p {krate} --allow-branch main {execute...} {bump}"

0 commit comments

Comments
 (0)