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

1.0.1 • Public • Published

mac-sudo-prompt

Run a macOS command using sudo, prompting the user with an OS dialog if necessary. Refactor of the macOS portion of sudo-prompt.

Installation

Install the package from npm using your package manager (I recommend pnpm):

pnpm add mac-sudo-prompt

Usage

import { macSudoPrompt } from 'mac-sudo-prompt';

const { stdout, stderr } = await macSudoPrompt('echo "hello"');
console.log([stdout, stderr]); // Output: ['hello\n', '']

Readme

Keywords

none

Package Sidebar

Install

npm i mac-sudo-prompt

Weekly Downloads

3

Version

1.0.1

License

MIT

Unpacked Size

26.3 kB

Total Files

31

Last publish

Collaborators

  • leondreamed