aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js7
1 files changed, 5 insertions, 2 deletions
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) {
72 72
73 const cmd = spawn(pscPackageCommand, pscPackageArgs); 73 const cmd = spawn(pscPackageCommand, pscPackageArgs);
74 74
75 if (cmd.status !== 0) { 75 if (cmd.error) {
76 throw new Error(cmd.error);
77 }
78 else if (cmd.status !== 0) {
76 const error = cmd.stdout.toString(); 79 const error = cmd.stdout.toString();
77 80
78 throw new Error(error); 81 throw new Error(error);
@@ -140,7 +143,7 @@ module.exports = function purescriptLoader(source, map) {
140 compilationStarted: false, 143 compilationStarted: false,
141 compilationFinished: false, 144 compilationFinished: false,
142 installed: cache.installed, 145 installed: cache.installed,
143 srcOption: cache.srcOption 146 srcOption: []
144 }; 147 };
145 }); 148 });
146 149