Skip to content

have repo tilde expand paths - #775

Merged
whyrusleeping merged 1 commit into
masterfrom
fix/repo-tilde
Feb 13, 2015
Merged

whyrusleeping merged 1 commit into
masterfrom
fix/repo-tilde

Conversation

@whyrusleeping

Copy link
Copy Markdown
Member

As I work through examples, I feel like it would be much easier for the fsrepo to tilde expand paths given to it. This makes it much easier for users to write the following code:

r := fsrepo.At("~/.go-ipfs")

instead of:

home := os.GetEnv("HOME")
if len(home) == 0 {
    panic("WHAT IS HAPPENING?")
}
r := fsrepo.At(home + "/.go-ipfs")

@whyrusleeping whyrusleeping added the status/in-progress In progress label Feb 12, 2015
@jbenet

jbenet commented Feb 12, 2015

Copy link
Copy Markdown
Member

I'm fine with this. i dont know all the places its used and whether that violates any assumptions. but tests pass so i guess that's fine.

@jbenet

jbenet commented Feb 12, 2015

Copy link
Copy Markdown
Member

changes lgtm

@whyrusleeping

Copy link
Copy Markdown
Member Author

I think that anything user facing should accept as wide an array of inputs as possible

whyrusleeping added a commit that referenced this pull request Feb 13, 2015
@whyrusleeping
whyrusleeping merged commit d4d3e29 into master Feb 13, 2015
@whyrusleeping whyrusleeping removed the status/in-progress In progress label Feb 13, 2015
@whyrusleeping
whyrusleeping deleted the fix/repo-tilde branch February 13, 2015 03:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants