Macro libmake::macro_execute_and_log
source · macro_rules! macro_execute_and_log { ($command:expr, $package:expr, $operation:expr, $start_message:expr, $complete_message:expr, $error_message:expr) => { ... }; }
Expand description
Executes a shell command and logs the start, completion, and any errors.
§Parameters
$command- The shell command to execute as a string slice.$package- The name of the package being operated on as a string slice.$operation- A description of the operation as a string slice.$start_message- The message to log at the start of the operation as a string slice.$complete_message- The message to log upon successful completion as a string slice.$error_message- The message to log in case of an error as a string slice.
§Returns
Returns a Result<(), anyhow::Error> to indicate the success or failure of the command execution.