diff --git a/assets/disk0/tvdos/bin/command.js b/assets/disk0/tvdos/bin/command.js index 98a07ee..659c38e 100644 --- a/assets/disk0/tvdos/bin/command.js +++ b/assets/disk0/tvdos/bin/command.js @@ -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 {