Package Exports
- sudo-block
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (sudo-block) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
sudo-block 
Block users from running your app with root permissions.
Install
Install with npm: 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
. Accepts a custom message
.
sudoBlock.isRoot
Boolean indicating whether the current user is root
.
License
MIT © Sindre Sorhus