Merge pull request #1419 from thelounge/xpaw/remove-homedir-polyfill

Remove os.homedir() polyfill
This commit is contained in:
Jérémie Astori 2017-08-16 12:56:55 -04:00 committed by GitHub
commit 10d38e107c
1 changed files with 1 additions and 10 deletions

View File

@ -116,17 +116,8 @@ function expandHome(shortenedPath) {
if (!shortenedPath) {
return "";
}
var home;
if (os.homedir) {
home = os.homedir();
}
if (!home) {
home = process.env.HOME || "";
}
home = home.replace("$", "$$$$");
const home = os.homedir().replace("$", "$$$$");
return path.resolve(shortenedPath.replace(/^~($|\/|\\)/, home + "$1"));
}