aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/main.rs')
-rw-r--r--crates/shirabe/src/main.rs13
1 files changed, 6 insertions, 7 deletions
diff --git a/crates/shirabe/src/main.rs b/crates/shirabe/src/main.rs
index ad35201..6281ddd 100644
--- a/crates/shirabe/src/main.rs
+++ b/crates/shirabe/src/main.rs
@@ -2,7 +2,7 @@
use shirabe::console::Application;
use shirabe::util::Platform;
-use shirabe_php_shim::realpath;
+use shirabe_php_shim::{realpath, run_shutdown_functions};
fn main() {
// TODO(php-runtime): the full initialization process in composer/bin/composer should be ported
@@ -15,11 +15,10 @@ fn main() {
// run the command application
let mut application = Application::new("Composer".to_string(), String::new());
- match application.run(None, None) {
- Ok(_) => {}
- Err(e) => {
- eprintln!("{}", e);
- std::process::exit(1);
- }
+ let result = application.run(None, None);
+ run_shutdown_functions();
+ if let Err(e) = result {
+ eprintln!("{}", e);
+ std::process::exit(1);
}
}