atom-archive / node-runas

Run command synchronously (with Administrator privilege)
MIT License
47 stars 20 forks source link

Add an async option on macOS that returns a file descriptor for a pipe to the subprocess #33

Closed nathansobo closed 7 years ago

nathansobo commented 7 years ago

This PR is intended as part of a solution to https://github.com/atom/atom/issues/15267. The plan is to run dd via this module as we currently do in pathwatcher, but instead of passing the contents of the file to be written synchronously, we'll obtain a file descriptor and pass it to a new method save method on superstring's buffer.

This PR also removes CoffeeScript, Grunt, and Jasmine dependencies.

A new test is added using Mocha, but the test prompts for a password, so isn't really ideal for CI.

/cc @maxbrunsfeld

MickdeGraaf commented 7 years ago

Could this also be added to Windows? I need to run something async with admin privileges.

maxbrunsfeld commented 7 years ago

@MickdeGraaf Yes! We've decided to create a new module instead of modifying runas. See https://github.com/atom/spawn-as-admin.