See https://github.com/shelljs/shelljs/pull/856#issuecomment-398963846 This involves rewriting a test, but also fixing `shell.exec()` to expect the RangeError.