extensions/typescript-language-features/src/ui/jsNodeWalkthrough.electron.ts/nodeWasResolvable
export async function nodeWasResolvable(): Promise<boolean> {
	let execStr: string;
	switch (process.platform) {
		case 'win32':
			execStr = 'where node';
			break;
		case 'aix':
		case 'cygwin':
		case 'darwin':
		case 'freebsd':
		case 'haiku':
		case 'linux':
		case 'netbsd':
		case 'openbsd':
		case 'sunos':
			execStr = 'which node';
			break;
		default:
			return false;
	}

	return new Promise(resolve => {
		cp.exec(execStr, { windowsHide: true }, err => {
			resolve(!err);
		});
	});
}