1.0.1 • Published 2 years ago

mac-sudo-prompt v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

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', '']