mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-03-07 19:51:51 +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) {
|
||||
var retval = shell.coreutils[cmd.toLowerCase()](tokens)
|
||||
retValue = retval|0 // return value of undefined will cast into 0
|
||||
try {
|
||||
var retval = shell.coreutils[cmd.toLowerCase()](tokens)
|
||||
retValue = retval|0 // return value of undefined will cast into 0
|
||||
}
|
||||
catch {
|
||||
if (!retValue) retValue = 1
|
||||
}
|
||||
continue
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user