use std::{ fs::{File, OpenOptions}, path::PathBuf, }; pub mod cli; pub mod command_builder; pub mod compose; pub mod scripts; // NOTE: stolen from https://docs.rs/debug_print/latest/debug_print/ #[macro_export] macro_rules! debug_eprintln { ($($arg:tt)*) => (#[cfg(debug_assertions)] eprintln!($($arg)*)); } fn safe_create_file(path: PathBuf) -> Result { OpenOptions::new().write(true).create_new(true).open(path) } // truncate(false) keeps an existing file's contents, which is what callers creating // an empty __init__.py want fn create_file(path: PathBuf) -> Result { OpenOptions::new() .write(true) .create(true) .truncate(false) .open(path) }