-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
resolve homedir #106
resolve homedir #106
Conversation
func encodeBlock(dst, src []byte) (d int) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, these are vendored deps. We should just leave them alone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so just remove the go fmt
commit? Can do, although it means go fmt ./...
is always going to cause problems in this repo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. Unfortunately, our vendoring game here could use some work.
main.go
Outdated
return ipfspath, nil | ||
expandedPath, err := homedir.Expand(ipfspath) | ||
if err != nil { | ||
return "", nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no error? This seems like an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed. Although question, is it safe/smart to be using homedir
this vendored way homedir "github.com/ipfs/fs-repo-migrations/ipfs-2-to-3/Godeps/_workspace/src/github.com/mitchellh/go-homedir"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be fine.
ee4f100
to
10bfc70
Compare
10bfc70
to
7f295d3
Compare
While go-ipfs will resolve
~/myipfspath
intouserHomeDir/myipfspath
fs-repo-migrations would not. This PR adds resolving~
into the users' home directory.Review by commit, since this PR includes some overdue
go fmt
changes as well.