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

Absolute path with trailing slash is not matched to a FsResolver #898

Closed
omsmith opened this issue Oct 3, 2013 · 2 comments
Closed

Absolute path with trailing slash is not matched to a FsResolver #898

omsmith opened this issue Oct 3, 2013 · 2 comments
Labels

Comments

@omsmith
Copy link

omsmith commented Oct 3, 2013

lib/core/resolverFactory.js:61

absolutePath = path.resolve(config.cwd, source);

if (/^\.\.?[\/\\]/.test(source) || /^~\//.test(source) || path.normalize(source) === absolutePath) {

path.resolve removes trailing slashes, whereas path.normalize does not.

As an example, bower install /home/omsmith/dev/gitrepo/ fails where bower install /home/omsmith/dev/gitrepo succeeds.

@satazor
Copy link
Member

satazor commented Oct 4, 2013

Good catch!

@satazor satazor closed this as completed in 60c522a Oct 4, 2013
satazor added a commit that referenced this issue Oct 4, 2013
Fix absolute paths ending with / not going through the FsResolver, fixes #898
@omsmith
Copy link
Author

omsmith commented Oct 4, 2013

Great, hadn't gotten around to putting together a fix, so thanks for grabbing it!

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

No branches or pull requests

2 participants