From ade6175f159c86fd36935a25d22f281549b8fa07 Mon Sep 17 00:00:00 2001 From: Mars Hall Date: Thu, 19 Dec 2024 11:25:28 -0800 Subject: [PATCH] Add 1-second sleep before exit of release executor. (#19) --- buildpacks/release-phase/src/bin/exec-release-commands.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/buildpacks/release-phase/src/bin/exec-release-commands.rs b/buildpacks/release-phase/src/bin/exec-release-commands.rs index 0c45907..edb8424 100644 --- a/buildpacks/release-phase/src/bin/exec-release-commands.rs +++ b/buildpacks/release-phase/src/bin/exec-release-commands.rs @@ -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, @@ -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); } }