Support non-interactive use of ensureVenv script#13881
Merged
Merged
Conversation
See test results for failed build of commit 19942e5520 |
feerrenrut
reviewed
Jul 9, 2022
|
|
||
|
|
||
| def askYesNoQuestion(message: str) -> bool: | ||
| def askYesNoQuestion(message: str, default: bool = True) -> bool: |
Contributor
There was a problem hiding this comment.
I think the default should be explicit. There are only two usages.
Contributor
I think it would be a good idea to have a record of this in the build output. If this does the wrong thing in some situation it will be much easier to track it down. |
This comment was marked as outdated.
This comment was marked as outdated.
feerrenrut
reviewed
Jul 12, 2022
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
feerrenrut
approved these changes
Jul 14, 2022
feerrenrut
left a comment
Contributor
There was a problem hiding this comment.
Thanks for your work here @LeonarddeR
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.
Link to issue number:
#13048 (comment)
Summary of the issue:
#13048 introduced another prompt to adres when dependencies in requirements.txt have changed. This blocks non-interactive use of the ensureVenv script, e.g. when running "scons source" non-interactively.
Description of user facing changes
As proposed by @feerrenrut in #13048 (comment), just use defaults when running in non-interactive mode.
Description of development approach
See #13048 (comment). Note that isatty is not always avaliable on sys.stdout, e.g. when it is set to the NVDA python console.
Testing strategy:
Tested running
scons source > d:\outputand observed that the venv was dropped and recreated.Known issues with pull request:
Do we want to present the question and also print that the question has been answered as default due to running in non-interactive, I figured it would be a bit overkill for that purpose.
Change log entries:
None needed
Code Review Checklist: