sudo-block
TypeScript icon, indicating that this package has built-in type declarations

5.0.0 • Public • Published

sudo-block

Block users from running your app with root permissions

Install

npm install sudo-block

Usage

import sudoBlock from '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

A custom message.

Package Sidebar

Install

npm i sudo-block

Weekly Downloads

106,468

Version

5.0.0

License

MIT

Unpacked Size

3.7 kB

Total Files

5

Last publish

Collaborators

  • sindresorhus