fix #26 - should resolve to absolute path unless / is the first character

This commit is contained in:
Craig Condon
2013-07-26 13:40:54 -07:00
parent c3c1ddaaf0
commit e8ea712a45
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -32,7 +32,8 @@ if(argv.h || argv.help) {
function toRelative(pt) {
return path.normalize(pt.replace(/^\./, process.cwd() + "/."));
if(pt.substr(0, 1) == "/") return pt;
return path.join(process.cwd(), pt);
}
+2 -2
View File
@@ -2,7 +2,7 @@
"author": "Craig Condon <craig.j.condon@gmail.com>",
"name": "nexe",
"description": "Roll node.s applications into a single executable",
"version": "0.2.1",
"version": "0.2.2",
"repository": {
"type": "git",
"url": "git://github.com/crcn/nexe.git"
@@ -22,4 +22,4 @@
"nexe": "./bin/nexe"
},
"devDependencies": {}
}
}