Skip to content
/ sudo-block Public template
forked from sindresorhus/sudo-block

Block users from running your app with root permissions

License

Notifications You must be signed in to change notification settings

alltheshot768/sudo-block

 
 

Repository files navigation

sudo-block Build Status

Block users from running your app with root permissions

Install

$ npm install sudo-block

Usage

const 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

Custom message.

License

MIT © Sindre Sorhus

About

Block users from running your app with root permissions

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 97.7%
  • TypeScript 2.3%