hypersoft / Krypton

Portable JavaScript Interpreter Featuring Mozilla Rhino and POSIX Extensions
Mozilla Public License 2.0
1 stars 1 forks source link

Console Mode Read Password #9

Open hypersoft opened 6 years ago

hypersoft commented 6 years ago

There is no support for this operation.

hypersoft commented 6 years ago

Support for this method is not available due to the way Java implements the feature.

  1. Obtaining the console object is not guaranteed to succeed.
  2. The readPassword method of the console object doesn't delete the last line entered and this causes ugly formatting issues with krypton's read-eval-print-loop within the context of line mode operations, because there is no way for krypton to detect the last line, and there is no known way for XPR to scrub the last line post operation completion.

basically, java's standard implementation of console does not meet this project's requirements. Support for this is a low-priority. The recommended course of action is to use XPR.run, targeting a system command/utility which provides the CORRECT functionality.