Skip to content

If stdin is closed cursorPosition throws a RangeError #34

@bsutton

Description

@bsutton

if stdin is closed (seems to be within docker)
hen the call to Console.cursorPosition will fail.
RangeError: Invalid value: Not in inclusive range 0..1114111: -1
new String.fromCharCode (dart:core-patch/string_patch.dart:45)
Console.cursorPosition (package:dart_console/src/console.dart:304)

looks like the results from the read need to be checked for -1 (end of file) before trying to decode as a char code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions