Remove os.homedir() polyfill

This commit is contained in:
Pavel Djundik 2017-08-16 10:06:20 +03:00 committed by Jérémie Astori
parent aef1bb3acc
commit 8343f3cdcf
No known key found for this signature in database
GPG key ID: B9A4F245CD67BDE8

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