#!/usr/bin/env node
'use strict';

console.log('hi!');

var exec = require('child_process').exec;

exec('dir', function (error, stdout, stderr) {
	console.log(stdout);
	if (stderr) {
		console.error(stderr);
	}
	if (error !== null) {
		console.error(error);
	}
});

#!/usr/bin/env node
'use strict';

console.log('hi!');

var exec = require('child_process').exec;

var lss = process.platform === 'win32' ? 'dir' : 'ls';

exec(lss, function (error, stdout, stderr) {
	console.log(stdout);
	if (stderr) {
		console.error(stderr);
	}
	if (error !== null) {
		console.error(error);
	}
});

Stop crashing on bash