carols10cents / cargo-open

A third-party cargo extension to allow you to open a dependent crate in your $EDITOR
Apache License 2.0
22 stars 5 forks source link

Allows running stand-alone (WIP) #10

Open kbknapp opened 8 years ago

kbknapp commented 8 years ago

DO NOT MERGE

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:

carols10cents commented 8 years ago

This is awesome! I'll take a look at how to get CARGO_HOME soon :)