Skip to content

nightly 2018/03/19: change of position of arguments passed to cargo subcommands #5208

Closed
@PaulGrandperrin

Description

@PaulGrandperrin

Hello,
This nightly just broke my crate:
https://travis-ci.org/rust-fuzz/honggfuzz-rs/builds

It looks like it there has been a change in how cargo passes arguments to subcommands.

I guess we have a typical case of:
xkcd

Here is the piece of code that worked before and now doesn't: https://github.com/rust-fuzz/honggfuzz-rs/blob/master/src/bin/cargo-hfuzz.rs#L169-L171

    let mut args = env::args().skip(1);
    if args.next() != Some("hfuzz".to_string()) {
        eprintln!("please launch as a cargo subcommand: \"cargo hfuzz ...\"");
        process::exit(1);
    }

Just to be clear, this is absolutely no big deal for me and I don't care adapting my code. I just want to be sure, the change in behavior is known.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions