Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Allows running stand-alone (WIP) #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kbknapp
Copy link

@kbknapp kbknapp commented Oct 6, 2015

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 😉)

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 😄

@@ -26,11 +26,25 @@ fn main() {
.help("The name of the crate you would like to open")
.required(true)
.index(1)))
.settings(&[AppSettings::SubcommandRequired])
.arg(Arg::with_name("CRATE")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

COOL!!! 🆒 🆒 🆒

@carols10cents
Copy link
Owner

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants