Skip to main content

tracel_xtask/utils/
mod.rs

1use std::process::Command;
2
3pub mod aws;
4pub mod cargo;
5pub mod cleanup;
6pub mod git;
7pub mod helpers;
8pub mod process;
9pub mod prompt;
10pub mod rustup;
11pub mod terraform;
12pub mod time;
13pub mod workspace;
14
15pub fn get_command_line_from_command(command: &Command) -> String {
16    let args: Vec<String> = command
17        .get_args()
18        .map(|arg| format!("\"{}\"", arg.to_string_lossy().into_owned()))
19        .collect();
20    format!(
21        "{} {}",
22        command.get_program().to_string_lossy(),
23        args.join(" ")
24    )
25}