This small change allows running cargo-open standalone as well as as a subcommand of cargo...well, almost.
Running cargo open <crate> works as expected. Running cargo-open <crate> also works...but not quite as expected. The problem is $CARGO_HOME isn't set when cargo doesn't run. (Also note, cargo-open or cargo open without a crate still spits out the required error messages :wink:)
If you know of a way to cleanly set $CARGO_HOME (to include when users are using multirust) it should be as simple as setting that variable. I'm just not familiar enough with cargo (yet) to set it manually.
Overall this would make hacking on cargo-open a little easier/faster. So if it's something you'd like to pursue I'll keep looking for something that'll work :smile:
DO NOT MERGE
This small change allows running
cargo-open
standalone as well as as a subcommand ofcargo
...well, almost.Running
cargo open <crate>
works as expected. Runningcargo-open <crate>
also works...but not quite as expected. The problem is$CARGO_HOME
isn't set whencargo
doesn't run. (Also note,cargo-open
orcargo open
without a crate still spits out the required error messages :wink:)If you know of a way to cleanly set
$CARGO_HOME
(to include when users are usingmultirust
) it should be as simple as setting that variable. I'm just not familiar enough withcargo
(yet) to set it manually.Overall this would make hacking on
cargo-open
a little easier/faster. So if it's something you'd like to pursue I'll keep looking for something that'll work :smile: