Skip to content
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

On OS X, '~' is not expanded properly #438

Closed
ysgard opened this issue Nov 24, 2014 · 2 comments
Closed

On OS X, '~' is not expanded properly #438

ysgard opened this issue Nov 24, 2014 · 2 comments
Labels

Comments

@ysgard
Copy link

ysgard commented Nov 24, 2014

irb(main):055:0> Rugged::Repository.new('/P4GitLab/p4-gitlab')
=> #<Rugged::Repository:70149931928520 {path: "/Users/juytven/P4GitLab/p4-gitlab/
/P4GitLab/p4-gitlab/.git/"}>
irb(main):056:0> Rugged::Repository.new('/my-repo')
Rugged::OSError: Failed to resolve path '
/my-repo': No such file or directory
from (irb):56:in new' from (irb):56 from /Users/juytven/.rbenv/versions/2.1.3/bin/irb:11:in

'
irb(main):057:0> quit

➜ p4-gitlab git:(master) gem list rugged

*** LOCAL GEMS ***

rugged (0.21.2, 0.21.0)
➜ p4-gitlab git:(master) ruby -v
ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-darwin14.0]
➜ p4-gitlab git:(master)

@skull-squadron
Copy link

~ is a shell-provided convenience, not a real directory.

Easiest solution: Rugged::Repository.new(File.expand_path('~/P4GitLab/p4-gitlab'))

@carlosmn
Copy link
Member

It looks like we forgot to close this issue. Indeed the tilde should be expanded by the method that does that, we take the path as-is.

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

No branches or pull requests

4 participants