Block users from running your app with root permissions
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.editorconfig tweaks Aug 13, 2014
.gitattributes init Jun 23, 2013
.gitignore init Jun 23, 2013
.jshintrc
.travis.yml Update .travis.yml Feb 8, 2015
index.js use `is-docker` module Apr 8, 2015
license
package.json 1.2.0 Apr 8, 2015
readme.md
screenshot.png
test.js

readme.md

sudo-block Build Status

Block users from running your app with root permissions

Install

$ npm install --save sudo-block

Usage

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