Merge pull request #1050 from metsjeesus/ssl_bundle

Fix to helper.expandhome to correctly resolve "" and undefined
This commit is contained in:
Jérémie Astori 2017-04-19 10:13:01 -04:00 committed by GitHub
commit f5dc6cc28f

View File

@ -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"));
}