From f1a8a7269f89b0274767453f5456a0435c25d730 Mon Sep 17 00:00:00 2001 From: Craig Condon Date: Fri, 26 Jul 2013 13:40:54 -0700 Subject: [PATCH] fix #26 - should resolve to absolute path unless / is the first character --- bin/nexe | 3 ++- package.json | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/nexe b/bin/nexe index 5aa7a0b..a36dfc9 100755 --- a/bin/nexe +++ b/bin/nexe @@ -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); } diff --git a/package.json b/package.json index 77af558..471a7d2 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Craig Condon ", "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": {} -} \ No newline at end of file +}