Skip to content

Commit eb6af57

Browse files
committed
fix(spawnify) try-catch
1 parent 148b8b7 commit eb6af57

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/spawnify.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,10 @@ Spawnify.prototype._set = function set(type, command, options) {
140140
args = command.split(' ');
141141
command = args.shift();
142142

143-
error = tryCatch(() => {
144-
child = spawn(command, args, options);
145-
});
143+
result = tryCatch(spawn, command, args, options);
144+
145+
error = result[0];
146+
child = result[1];
146147
break;
147148
}
148149

0 commit comments

Comments
 (0)