Skip to content

Commit d7a56e7

Browse files
committed
chore(spawnify) throw() -> throw
1 parent ff99874 commit d7a56e7

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/spawnify.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ module.exports = (command, options) => {
3535
else
3636
options.cwd = process.cwd()
3737

38-
const spawnify = new Spawnify(command, options);
39-
40-
return spawnify;
38+
return new Spawnify(command, options);
4139
};
4240

4341
function Spawnify(command, options) {
@@ -127,7 +125,7 @@ Spawnify.prototype._set = function set(type, command, options) {
127125

128126
switch(type) {
129127
default:
130-
throw(Error('type could be exec or spawn only!'));
128+
throw Error('type could be exec or spawn only!');
131129

132130
case 'exec':
133131
result = tryCatch(exec, command, options);

0 commit comments

Comments
 (0)