Skip to content
Check if the process is running with elevated privileges
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.editorconfig
.gitattributes
.gitignore
.travis.yml
index.js
license
package.json
readme.md
test.js

readme.md

is-elevated Build Status

Check if the process is running with elevated privileges

By checking if the process is root on Unix systems or if the user is Administrator on Windows.

Keep in mind that root and Administrator mean different things so this module might not be suitable for your use-case.

Install

$ npm install --save is-elevated

Usage

const isElevated = require('is-elevated');

isElevated().then(elevated => {
	console.log(elevated);
	//=> false
});

Related

  • sudo-block - Block users from running your app with root permissions

License

MIT © Sindre Sorhus

You can’t perform that action at this time.