From 6ccb09a5950b032f7cc5e6af5a1bba29773385c8 Mon Sep 17 00:00:00 2001 From: eric thul Date: Sun, 23 Apr 2017 19:02:01 -0400 Subject: Fix requires and psc-package caching --- src/index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/index.js') diff --git a/src/index.js b/src/index.js index f77e5f8..11b06eb 100644 --- a/src/index.js +++ b/src/index.js @@ -72,7 +72,10 @@ module.exports = function purescriptLoader(source, map) { const cmd = spawn(pscPackageCommand, pscPackageArgs); - if (cmd.status !== 0) { + if (cmd.error) { + throw new Error(cmd.error); + } + else if (cmd.status !== 0) { const error = cmd.stdout.toString(); throw new Error(error); @@ -140,7 +143,7 @@ module.exports = function purescriptLoader(source, map) { compilationStarted: false, compilationFinished: false, installed: cache.installed, - srcOption: cache.srcOption + srcOption: [] }; }); -- cgit v1.2.3