Skip to content

Commit

Permalink
Add 1-second sleep before exit of release executor. (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
mars authored Dec 19, 2024
1 parent 7211301 commit ade6175
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions buildpacks/release-phase/src/bin/exec-release-commands.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Required due to: https://github.com/rust-lang/rust/issues/95513
#![allow(unused_crate_dependencies)]

use core::time;
use std::{
env,
path::Path,
Expand All @@ -20,10 +21,14 @@ fn main() {
match exec_release_sequence(commands_toml_path) {
Ok(()) => {
eprintln!("release-phase complete.");
// Work-around to allow logs to flush before exit.
std::thread::sleep(time::Duration::from_secs(1));
std::process::exit(0);
}
Err(error) => {
eprintln!("release-phase failed: {error}");
// Work-around to allow logs to flush before exit.
std::thread::sleep(time::Duration::from_secs(1));
std::process::exit(1);
}
}
Expand Down

0 comments on commit ade6175

Please sign in to comment.