Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

executive

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

executive - npm Package Compare versions

Comparing version 0.2.6 to 0.2.8

4

index.js

@@ -171,2 +171,6 @@ var child_process = require('child_process'),

if (typeof options.safe === 'undefined') {
options.safe = true;
}
if (!callback) {

@@ -173,0 +177,0 @@ callback = function() {};

2

package.json
{
"name": "executive",
"version": "0.2.6",
"version": "0.2.8",
"description": "exec for the lazy",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -6,4 +6,4 @@ exec = require('../');

it('should buffer all stdout', function(done) {
exec.bufferedExec('ls', [], {}, function(err, out, code) {
out.should.not.eq('')
exec.bufferedExec('zsh', ['-c', 'echo 1'], {}, function(err, out, code) {
out.should.eq('1\n')
done()

@@ -14,5 +14,40 @@ })

it('should buffer all stderr', function(done) {
done()
exec.bufferedExec('zsh', ['-c', 'doesnotexist'], {}, function(err, out, code) {
err.should.contain('command not found')
done()
})
})
})
describe('quietExec', function() {
it('should buffer all stdout', function(done) {
exec.quietExec('zsh', ['-c', 'echo 1'], {}, function(err, out, code) {
out.should.eq('1\n')
done()
})
})
it('should buffer all stderr', function(done) {
exec.quietExec('zsh', ['-c', 'doesnotexist'], {}, function(err, out, code) {
err.should.contain('command not found')
done()
})
})
})
describe('interactiveExec', function() {
it('should not buffer stdout', function(done) {
exec.interactiveExec('zsh', ['-c', 'echo 1'], {}, function(err, out, code) {
(out == null).should.be.true
done()
})
})
it('should not buffer stderr', function(done) {
exec.interactiveExec('zsh', ['-c', 'doesnotexist'], {}, function(err, out, code) {
(err == null).should.be.true
done()
})
})
})
})
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc