Skip to content

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

@cillianderoiste

Description

@cillianderoiste

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions