From 2d18ba76cc450d22d9c2b795e632b26d88255c40 Mon Sep 17 00:00:00 2001 From: Bryan Roe Date: Mon, 3 Aug 2020 10:58:44 -0700 Subject: [PATCH] Added root check for macOS --- agents/meshinstall-linux.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/agents/meshinstall-linux.js b/agents/meshinstall-linux.js index a1b9fe7f..52308431 100644 --- a/agents/meshinstall-linux.js +++ b/agents/meshinstall-linux.js @@ -95,6 +95,10 @@ if (process.platform != 'darwin') process.exit(); } } +else +{ + if (!require('user-sessions').isRoot()) { console.log('\n' + "This utility requires elevated permissions. Please try again with sudo."); process.exit(); } +} if (!s) {