const {execSync} = require('child_process');
const logger = require('./logger')('exec');

module.exports = (cmd, options) => {
	try {
		return execSync(cmd, options).toString().slice(0, -1);
	} catch (err) {
		logger.error('`%s` failed with code %d', cmd, err.status);
		process.exit(-1);
	}
};

@@ -133,14 +133,22 @@
 %7B%0A%09%09
-return
+const output =
  exe
@@ -166,16 +166,42 @@
 options)
+;%0A%0A%09%09return (output %7C%7C '')
 .toStrin

fix exec for empty output