Atom and all repositories under Atom will be archived on December 15, 2022. Learn more in our official announcement
Run commands with administrator privileges
npm install spawn-as-adminLaunches a new process with the given command, and arguments.
Returns an AdminProcess object that implements a subset of node's ChildProcess API:
pid- The child process's process ID.stdin- AWritableStreamrepresenting the process's standard input.stdout- AReadableStreamrepresenting the process's standard output.
kill([signal])- Sends the givensignalto the child process. If no signal is specified,SIGTERMwill be sent.
exit- Emitted when the process exits, and passes the exit code of the process.
- The library only works on macOS and Windows.
- The
stdinandstdoutproperties are only present on macOS.