mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-12 23:54:04 +09:00
fix: error from coreutils would kill the cmd
This commit is contained in:
@@ -684,8 +684,13 @@ shell.execute = function(line) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (shell.coreutils[cmd.toLowerCase()] !== undefined) {
|
if (shell.coreutils[cmd.toLowerCase()] !== undefined) {
|
||||||
var retval = shell.coreutils[cmd.toLowerCase()](tokens)
|
try {
|
||||||
retValue = retval|0 // return value of undefined will cast into 0
|
var retval = shell.coreutils[cmd.toLowerCase()](tokens)
|
||||||
|
retValue = retval|0 // return value of undefined will cast into 0
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
if (!retValue) retValue = 1
|
||||||
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user