Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,15 @@ impl Collector for CommandLine {

fn collect(&mut self, _: &CrateInfo) -> Result<ReportEntry> {
let mut result = String::new();
let mut past_first = false;

for arg in std::env::args_os() {
if past_first {
result += " ";
} else {
past_first = true;
}
result += &shell_escape::escape(arg.to_string_lossy());
result += " ";
}

Ok(ReportEntry::Code(Code {
Expand Down Expand Up @@ -238,10 +243,9 @@ impl<'a> Collector for CommandOutput<'a> {

result += "> ";
result += &self.cmd.to_string_lossy();
result += " ";
for arg in &self.cmd_args {
result += &shell_escape::escape(arg.to_string_lossy());
result += " ";
result += &shell_escape::escape(arg.to_string_lossy());
}

result += "\n";
Expand Down
Loading