Repository navigation
fix(cli): re-prompt on invalid confirmation answers instead of cancelling - #1244
Open
kaggle-marvin wants to merge 1 commit into
Open
kaggle-marvin wants to merge 1 commit into
kaggle-marvin wants to merge 1 commit into
Conversation
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.
`KaggleApi.confirmation()` (used by `kaggle b init`/`b auth` and the delete commands) cancelled on the first answer it didn't recognise, even though it's wrapped in a `while True` loop. It also didn't strip input, so `y ` or a stray `\r` counted as invalid, and the error text ("Please respond with 'yes' or 'no'") made the `[Y/n]` prompt look like it required typing `yes`.
Changes:
Tests: new `tests/unit/test_confirmation.py`. The existing delete and benchmarks unit tests still pass.
Reported in https://chat.kaggle.net (thread fttawmbz8byp8gdgh6jkwr8ymc).