Skip to content
This repository was archived by the owner on Oct 1, 2019. It is now read-only.

Commit 036c8a6

Browse files
ryanashcraftpatrick91
authored andcommitted
Throw python exec spawnSync errors (#99)
1 parent dfb3f69 commit 036c8a6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/parser.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@ function parseText(text, pythonExecutable) {
1212
}
1313
);
1414

15+
const executionError = executionResult.error;
16+
17+
if (executionError) {
18+
if (executionError.code === "ENOENT") {
19+
throw new Error(`${pythonExecutable} was not found in your PATH`);
20+
} else {
21+
throw executionError;
22+
}
23+
}
24+
1525
const error = executionResult.stderr.toString();
1626

1727
if (error) {

0 commit comments

Comments
 (0)