fix: updated string that identifies escape key presses when prompting for required vars#2942
Draft
anilnatha wants to merge 1 commit into
Draft
fix: updated string that identifies escape key presses when prompting for required vars#2942anilnatha wants to merge 1 commit into
anilnatha wants to merge 1 commit into
Conversation
…o 'esc' to match the string the uv identifies as the escape key.
Author
|
Hello, this is my first PR for this codebase. While I have tested this change using the listed tests above, being new to this codebase I wanted to ask if I should have left the original string for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses a fix needed to identify if the escape key is pressed when a user is prompted for a required variable.
The issue existed in
internal/input/input.gowhere there were two switch statements that checked if the escape key was pressed using the stringescape. However,uvidentifies the escape key using the stringesc, notescape. Because of this discrepancy, task never quit when the escape key was pressed after prompting the user for a required var. After changingescapetoescand running the following two tests I was able to verify that the issue has been fixed:AI Disclosure: I used Cursor to help me identify where in the code the keypress events were being done when prompting for required vars. I then investigated the
uvandbubbleteadocumentation and codebases to identify that the escape key string may have been incorrect. Then experimented on my macOS system (v26.5.2), swapping between the stringsescapeandescat the locations identified in the changed files and running the two tests above a number of times.