From 84576613bec295cc3d17db96c7672fd144e1385c Mon Sep 17 00:00:00 2001 From: rob Date: Mon, 17 Jul 2023 00:23:04 -0400 Subject: [PATCH] remove superuser requirement The entire library already uses sudo to execute ufw commands, so it's perfectly fine to let the Node process run as a non-root user and manage permissions with sudoers on Linux hosts (all I care about). --- src/Index.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Index.ts b/src/Index.ts index b4f3389..103a6ad 100644 --- a/src/Index.ts +++ b/src/Index.ts @@ -1,9 +1,5 @@ import { checkSudo, checkNodeVersion, checkPlatform, checkPlatformExact } from './Util'; -if (!checkSudo()) { - throw new Error("You need to be root to run this package."); -}; - if (!checkNodeVersion()) { throw new Error(`The Node version must be at least v14 or above.`); };