diff options
author | Rory Dudley | 2024-02-19 01:40:58 -0700 |
---|---|---|
committer | Rory Dudley | 2024-02-19 01:40:58 -0700 |
commit | 2e5cc53499947c32b01ea5e1787ed505bc286969 (patch) | |
tree | dd50886fb13b8c281f29b580ef5042795fdfa07f /src/poem/elements/verse/logic.rs | |
parent | 670f3864e08003b89a362f381a12d509611db870 (diff) | |
download | dwarvish-2e5cc53499947c32b01ea5e1787ed505bc286969.tar.gz |
Refresh path only if command is not found
This is a modified implementation of the 'refresh path on every
iteration of the loop' idea. It instead, only refreshes the path if the
command is not found. After the first refresh, if the command still is
not found, it throws and error.
Notes
Notes:
This is probably the most sane solution, however, it has an issue. It
can detect new files in the path just fine, but it cannot detect if a
file was removed from the path. It may be prudent to expand the error
handling when we fork, to see what kind of error the process is
returning, and handle it more apropriately.
Another solution may be to check the always check the existence of a
file in the path before returning it from the match closure. This will
overall slow down the REPL, however, since we'd now be making that check
twice.
Diffstat (limited to 'src/poem/elements/verse/logic.rs')
0 files changed, 0 insertions, 0 deletions