Skip to content

Latest commit

 

History

History
18 lines (15 loc) · 515 Bytes

README.md

File metadata and controls

18 lines (15 loc) · 515 Bytes

Is that package installed?

$ npm install debian-package-installed

Checks to see if a package is installed on a Debian system by running dpkg-query -w <package>. Returns the child process that was spawned. Example:

var installed = require('debina-package-installed');
installed('nginx', {
	// spawn options
	stdio: 'inherit' // See the full output
}).on('close', function(code) {
	if (code !== 0) return console.log('Package not installed');
	console.log('Package installed');
});