Skip to content

Commit

Permalink
xtask: Prevent accidental git commit deletion
Browse files Browse the repository at this point in the history
when dry-running a publish.
  • Loading branch information
har7an committed Aug 27, 2023
1 parent db73e91 commit 462f36f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xtask/src/pipelines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ pub fn publish(sh: &Shell, flags: flags::Publish) -> anyhow::Result<()> {
// program. When dry-running we need to undo the release commit first!
let result = closure();

if flags.dry_run {
if flags.dry_run && !skip_build {
cmd!(sh, "git reset --hard HEAD~1")
.run()
.context(err_context)?;
Expand Down

0 comments on commit 462f36f

Please sign in to comment.