From 4aa9f5c0b08e7de7d1990b2e89960d2ad77f1306 Mon Sep 17 00:00:00 2001 From: Dov Benyomin Sohacheski Date: Wed, 15 Mar 2023 16:21:53 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8F=A0=20Natively=20get=20user's=20homedi?= =?UTF-8?q?r?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index da6cf3e..c6d818e 100755 --- a/index.js +++ b/index.js @@ -4,6 +4,7 @@ const colors = require('colors'); const download = require('download-git-repo'); const shell = require('shelljs'); const ora = require('ora'); +const os = require("os"); const fs = require('fs-extra'); const ip = require('ip'); const path = require('path'); @@ -16,9 +17,7 @@ const spinner = ora(); * Returns the absolute installation path for Sonos Web */ function absoluteInstallPath() { - shell.cd('~'); - const absolutePath = `${shell.pwd().stdout}/.sonos-web`; - return absolutePath; + return `${os.homedir()}/.sonos-web`; } const foreverPath = `${path.dirname(require.resolve('forever/package.json'))}/bin/forever`;