suspawn

Sudo spawning utilities

SuSpawn

require('suspawn')('env', {
  env: {
    VARBLOCKEDBYSUDOERSNORMALLY: 'BUT NOT NOW!'
  }
}).stdout.pipe(process.stdout);

Environmental variables to pass to the sudo command.

Environmental variables to pass through to the spawned command.

User to spawn as.

Group to spawn as.

A useful little function if you do not actually want to spawn the process, but would rather get the options to spawn it yourself. This allows some modification instead of straight spawning.