blob: 8e8e3299a904c5b93c6efc8a78e3ea896563883f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
//! ref: composer/bin/composer
use shirabe_php_shim::{PHP_ENV, PHP_SERVER};
fn main() {
// Take the $_ENV / $_SERVER snapshots before any putenv() mutates the real environment.
// See `docs/dev/env-vars-porting.md` for details.
std::sync::LazyLock::force(&PHP_ENV);
std::sync::LazyLock::force(&PHP_SERVER);
let result = shirabe::run(std::env::args().collect());
let exit_code = match result {
Ok(exit_code) => exit_code,
Err(e) => {
eprintln!("{}", e);
1
}
};
std::process::exit(exit_code.min(255));
}
|