-
Notifications
You must be signed in to change notification settings - Fork 505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: disable showing sdk manager progress #838
base: master
Are you sure you want to change the base?
Conversation
It has no quiet mode and causes between 10 and 100 MEGABYTES of log spam. I mean c'mon. So let's just discard all of that using a simple grep vanish
…ndroid_update_sdk
Fixes #837 |
if "CI" in environ: | ||
sdkmanager_commands = list(sdkmanager_commands) | ||
sdkmanager_commands.insert(len(sdkmanager_commands), '>/dev/null') # mute stdout, important stuff goes to stderr anyways | ||
sdkmanager_commands = tuple(sdkmanager_commands) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not skipping this whole part since you already introduced the grep -v "^\\["
fix in the _sdkmanager()
method above?
if "CI" in environ and ">/dev/null" not in args: | ||
args = list(args) | ||
args.insert(len(args), ' | grep -v "^\\["') | ||
args = tuple(args) | ||
command = self.sdkmanager_path + ' ' + ' '.join(args) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead if this 4 lines of code "adding" the grep
o the args. I think it would be more simple to go after the command = self.sdkmanager_path + ' ' + ' '.join(args)
line and to do something like:
if 'CI' in environ:
# hide download lines which look like "[= ] 10% Downloading platform-tools"
command += r' | grep -v "^\["'
Also note that I've used a raw-string to make the grep expression more readable (by skipping the double escaping of the \
).
Last I've added a little code comment because it's not super obvious what we are doing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for addressing this.
I've left a couple of comment, would you mind addressing it 🙏
It has no quiet mode and causes between 10 and 100 MEGABYTES of log
spam. I mean c'mon.
So let's just discard all of that using a simple grep vanish