--- /dev/null
+fn main() {
+ let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap_or_default();
+ if target_os == "macos" {
+ println!("cargo:rustc-link-lib=framework=ScriptingBridge");
+ }
+}
#[tokio::main]
async fn main() -> Result<()> {
+ let result = run().await;
+
+ if cfg!(debug_assertions) {
+ result
+ } else {
+ match result {
+ Ok(_) => Ok(()),
+ Err(e) => {
+ eprintln!("Error: {}", e);
+ std::process::exit(1);
+ }
+ }
+ }
+}
+
+async fn run() -> Result<()> {
let mut configuration = Configuration::new();
let arguments = Arguments::parse();