Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sindresorhus/sudo-block

Block users from running your app with root permissions
https://github.com/sindresorhus/sudo-block

Last synced: about 23 hours ago
JSON representation

Block users from running your app with root permissions

Awesome Lists containing this project

README

        

# sudo-block

> Block users from running your app with root permissions

## Install

```sh
npm install sudo-block
```

## Usage

```js
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.