Before this commit I was getting the following error:
Finished dev [unoptimized + debuginfo] target(s) in 1m 07s
Running `target/debug/cargo-supply-chain`
thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', src/main.rs:80:8
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Context is this statement:
// When invoked via `cargo supply-chain update`, Cargo passes the arguments it receives verbatim.
// So instead of "update" our binary receives "supply-chain update".
// We ignore the "supply-chain" in the beginning if it's present.
if supply_args[0] == "supply-chain" {
supply_args.remove(0);
}
After a simple cargo run of this crate. I fixed the bounds error which may have been caused by pico-args not always returning the first argument as the caller
Before this commit I was getting the following error:
Context is this statement:
After a simple
cargo run
of this crate. I fixed the bounds error which may have been caused by pico-args not always returning the first argument as the caller