Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/sindresorhus/sudo-block
- Owner: sindresorhus
- License: mit
- Created: 2013-06-23T12:21:28.000Z (over 11 years ago)
- Default Branch: main
- Last Pushed: 2023-08-31T16:06:10.000Z (over 1 year ago)
- Last Synced: 2025-01-11T09:11:39.318Z (8 days ago)
- Language: JavaScript
- Homepage:
- Size: 72.3 KB
- Stars: 98
- Watchers: 6
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
- Security: .github/security.md
Awesome Lists containing this project
- awesome-nodejs-cn - sudo-block - 禁止用户用 root 权限使用你的程序 (包 / 命令行工具)
- awesome-nodejs-cn - sudo-block - **star:98** 阻止用户使用根权限运行应用程序 (包 / 命令行实用工具)
- awesome-nodejs - sudo-block - Block users from running your app with root permissions. (Packages / Command-line utilities)
- awesome-nodejs - sudo-block - Block users from running your app with root permissions - ★ 63 (Command-line utilities)
- awesome-node - sudo-block - Block users from running your app with root permissions. (Packages / Command-line utilities)
- awesome-nodejs-cn - sudo-block - 阻止用户用root权限使用你的程序. (目录 / 命令行工具)
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.