]> git.proxmox.com Git - cargo.git/commitdiff
Auto merge of #6849 - johnbartholomew:issue-2511-cargo-non-utf8-args, r=alexcrichton
authorbors <bors@rust-lang.org>
Mon, 15 Apr 2019 19:55:20 +0000 (19:55 +0000)
committerbors <bors@rust-lang.org>
Mon, 15 Apr 2019 19:55:20 +0000 (19:55 +0000)
Pass OsStr/OsString args through to the process spawned by cargo run.

This is intended to fix #2511, allowing non-UTF8 arguments to be passed through from cargo run to the spawned process. I was not sure whether the interface of cargo::ops needs to remain unchanged - I assume it does, so I added cargo::ops::run_os() taking &[OsString], and retained cargo::ops::run() with its current signature. If it's ok to change the internal cargo API then it may be better to just pass &[OsString] to run().

I have not tried to pass through OsStr/OsString to other places that could reasonably use them. Just one test added covering this path. It is restricted to `cfg(unix)` due to use of `std::os::unix::ffi::OsStrExt`.

This is my first pull request so I expect there will be changes needed to make this mergeable.


Trivial merge