function check (program) {
	exec('which ' + program, function (error, stdout, stderr) {
		process.stderr.write('has ')
		process.stderr.write(program)
		process.stderr.write(' ')
		if (error)
			process.stderr.write('✘')
		else
			process.stderr.write('✔')
		
		if (!error && !player) {
			player = program 
			process.stderr.write(' (selected)')
		}
		
		process.stderr.write('\n')
	})
}
// The first program to be found will be selected.
The first program to be found will be selected.
The first program to be found will be selected .
function check (program) {
	exec('which ' + program, function (error, stdout, stderr) {
		process.stderr.write('has ')
		process.stderr.write(program)
		process.stderr.write(' ')
		if (error)
			process.stderr.write('✘')
		else
			process.stderr.write('✔')
		if (!error && !player) {
			player = program 
			process.stderr.write(' (selected)')
		}
		process.stderr.write('\n')
	})
}
function check ( program ) { exec ( 'which ' + program , function ( error , stdout , stderr ) { process . stderr . write ( 'has ' ) process . stderr . write ( program ) process . stderr . write ( ' ' ) if ( error ) process . stderr . write ( '✘') else process . stderr . write ( '✔') if ( ! error && ! player ) { player = program process . stderr . write ( ' (selected)' ) } process . stderr . write ( '\n' ) } ) }
The first program to be found will be selected.
The first program to be found will be selected .