diff --git a/lib/minidump.js b/lib/minidump.js index d3209da..03d51e6 100644 --- a/lib/minidump.js +++ b/lib/minidump.js @@ -14,6 +14,15 @@ const commands = { } function execute (command, args, callback) { + let called = false + const origCallback = callback + callback = function (err, stdout) { + if (called) { + return + } + called = true + origCallback(err, stdout) + } let stdout = Buffer.alloc(0) let stderr = Buffer.alloc(0) const child = spawn(command, args)