4.0.2 • Published 7 years ago

execpe v4.0.2

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

Node.js - execpe

build status JavaScript Style Guide

This module causes your current Node.js process to be replaced by the process invoked by the parameter of this function. It's like the Ruby exec function. It currently does not work on Windows. It is a fork of JP Richardson's execpe with ability to override environment.

Usage

var execpe = require('execpe')

execpe('top') // your process now becomes top. equivalent of execpe('top', [], process.env);
var execpe = require('execpe')

execpe('du', [ '-sh', '/etc/fstab' ]) // your process now becomes du, with the arguments indicated
var execpe = require('execpe')

// your process now becomes du, with the arguments and environment as indicated
execpe('du', [ '-sh', '/etc/fstab' ], Object.assign({}, process.env, { TERM: 'bare' }))

Details

execpe can be called with one argument, where the first is the name of the executable, second is a list of params and third is a map of environment variables. Map of variables defaults to process.env.

License

(The MIT License)

Copyright (c) 2011-2017 JP Richardson & Jakub Skopal

4.0.2

7 years ago

4.0.1

7 years ago