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

path.join in cli.js prevents a full path from being used as the filename arg #166

Closed
cillianderoiste opened this issue Aug 17, 2011 · 0 comments

Comments

@cillianderoiste
Copy link
Contributor

in cli.js:

files = files.map(function(filename){
    return path.join(process.cwd(), filename);
});

This will prepend the cwd to the filename even when the filename is actually a full path. using path.resolve should fix this:
(http://nodejs.org/docs/v0.5.4/api/path.html#path.resolve)

files = files.map(function(filename){
    return path.resolve(process.cwd(), filename);
});

path.join("/a/b/c", "/d/e")
'/a/b/c/d/e'
path.resolve("/a/b/c", "/d/e")
'/d/e'

cillianderoiste added a commit to cillianderoiste/csslint that referenced this issue Aug 18, 2011
@nzakas nzakas closed this as completed in 5868e55 Aug 22, 2011
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

No branches or pull requests

2 participants