sudo-block

Block users from running your app with root permissions

npm install sudo-block
5 216 downloads in the last day
26 029 downloads in the last week
130 399 downloads in the last month

sudo-block Build Status

Block users from running your app with root permissions

Install

$ npm install --save sudo-block

Example

var sudoBlock = require('sudo-block');
sudoBlock();

API

sudoBlock(message)

When a file containing this function is run with root permissions it will exit and show an error message telling the user how to fix the problem so they don't have to run it with sudo

message

Type: String

Accepts a custom message.

License

MIT © Sindre Sorhus

npm loves you