diff --git a/src/index.js b/src/index.js index c84b92c..d12ff1c 100644 --- a/src/index.js +++ b/src/index.js @@ -58,11 +58,11 @@ module.exports = function (source) { } - const res = await execFile("go", ["build", "-o", outFile, parent], opts) + const result = await execFile("go", ["build", "-o", outFile, parent], opts) .then(() => true) .catch(e => e); - if (res instanceof Error) { - return cb(e); + if (result instanceof Error) { + return cb(result); } found = await fs.access(wasmSavePath).then(() => true).catch(() => false);