Skip to content

Commit 28e7b3e

Browse files
author
Michael O'Brien
committed
FIX: Cmd returning errors
1 parent aabda7a commit 28e7b3e

File tree

3 files changed

+14
-1613
lines changed

3 files changed

+14
-1613
lines changed

dist/ejs.es

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2796,13 +2796,16 @@ module ejs {
27962796
}
27972797
cmd.finalize()
27982798
cmd.wait()
2799+
/* Currently undocumented - return the error and results via options */
2800+
if (options.error) {
2801+
if (cmd.error) {
2802+
options.error = cmd.error
2803+
}
2804+
options.results = results.toString()
2805+
}
27992806
if (cmd.status != 0 && options.exceptions !== false) {
28002807
throw new IOError('Command failed, status ' + cmd.status + '\n' + cmd.error)
28012808
}
2802-
/* Currently undocumented */
2803-
if (options.error && cmd.error) {
2804-
options.error = cmd.error
2805-
}
28062809
return results.toString()
28072810
}
28082811

0 commit comments

Comments
 (0)