diff --git a/src/helper.js b/src/helper.js index 830b91c9..552b11ad 100644 --- a/src/helper.js +++ b/src/helper.js @@ -101,6 +101,9 @@ function ip2hex(address) { } function expandHome(shortenedPath) { + if (!shortenedPath) { + return ""; + } var home; if (os.homedir) { @@ -112,7 +115,6 @@ function expandHome(shortenedPath) { } home = home.replace("$", "$$$$"); - return path.resolve(shortenedPath.replace(/^~($|\/|\\)/, home + "$1")); }