pub async fn execute(
command: &str,
cwd: &Path,
shell_path: Option<&str>,
bin_dir: &Path,
cancel: CancellationToken,
on_chunk: impl FnMut(&str),
) -> Result<BashResult, String>Expand description
Runs command in cwd with the configured shell, calling on_chunk with
each sanitized piece of output, until it exits or cancel fires.