fix: don't panic on SIGINT exits

Unwrapping the process code caused panics on
SIGINTs. Now we default to code 1 if there is
none.
This commit is contained in:
daimond113 2025-02-17 00:33:49 +01:00
parent 1bc5defd9c
commit ef471069d8
No known key found for this signature in database
GPG key ID: 640DC95EC1190354
2 changed files with 5 additions and 2 deletions

View file

@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Fixed
- Fix panic when using SIGINT by @daimond113
### Changed
- Allow publishing other packages even if an error occurred by @daimond113

View file

@ -191,7 +191,7 @@ async fn run() -> anyhow::Result<()> {
.status()
.expect("failed to run lune");
std::process::exit(status.code().unwrap());
std::process::exit(status.code().unwrap_or(1));
}
let tracing_env_filter = EnvFilter::builder()
@ -315,7 +315,7 @@ async fn run() -> anyhow::Result<()> {
.status()
.expect("failed to run new version");
std::process::exit(status.code().unwrap());
std::process::exit(status.code().unwrap_or(1));
}
#[cfg(feature = "version-management")]