mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-25 11:14:46 +00:00
Ensure non-UTF8 compatibility of argfile arg
This commit is contained in:
parent
9155c0062b
commit
3f749f615b
@ -413,10 +413,11 @@ impl ProcessBuilder {
|
||||
.prefix("cargo-argfile.")
|
||||
.tempfile()?;
|
||||
|
||||
let path = tmp.path().display();
|
||||
let mut arg = OsString::from("@");
|
||||
arg.push(tmp.path());
|
||||
let mut cmd = self.build_command_without_args();
|
||||
cmd.arg(format!("@{path}"));
|
||||
log::debug!("created argfile at {path} for `{self}`");
|
||||
cmd.arg(arg);
|
||||
log::debug!("created argfile at {} for {self}", tmp.path().display());
|
||||
|
||||
let cap = self.get_args().map(|arg| arg.len() + 1).sum::<usize>();
|
||||
let mut buf = Vec::with_capacity(cap);
|
||||
|
Loading…
x
Reference in New Issue
Block a user