print a prettier command string

This commit is contained in:
Folkert 2022-12-17 22:21:00 +01:00
parent a522d49558
commit 1d260530fb
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
3 changed files with 15 additions and 13 deletions

View file

@ -5,6 +5,7 @@ extern crate roc_module;
extern crate tempfile;
use roc_utils::cargo;
use roc_utils::pretty_command_string;
use roc_utils::root_dir;
use serde::Deserialize;
use serde_xml_rs::from_str;
@ -447,15 +448,3 @@ pub fn known_bad_file(file_name: &str) -> PathBuf {
path
}
fn pretty_command_string(command: &Command) -> OsString {
let mut command_string = std::ffi::OsString::new();
command_string.push(command.get_program());
for arg in command.get_args() {
command_string.push(" ");
command_string.push(arg);
}
command_string
}