Fix incorrect attempt number displayed in dismiss_privacy_modal script#10
Fix incorrect attempt number displayed in dismiss_privacy_modal script#10DominikPalo wants to merge 1 commit intomainfrom
dismiss_privacy_modal script#10Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 11f8ec030a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
11f8ec0 to
26bb238
Compare
|
@codex review |
|
To use Codex here, create a Codex account and connect to github. |
|
@codex review :D |
|
Codex Review: Didn't find any major issues. Delightful! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
| # Check if PowerPoint is running | ||
| if pgrep -x "Microsoft PowerPoint" > /dev/null; then | ||
| echo "PowerPoint is running (attempt $attempt/$max_attempts)..." | ||
| echo "PowerPoint is running (attempt $((attempt + 1))/$max_attempts)..." |
There was a problem hiding this comment.
I don't get it why should be display attempt + 1 value here instead of just the actual attempt?
There was a problem hiding this comment.
Because in the script, attempts are indexed from zero (0...<20) and the attempt value is incremented at the end of the while-do block (after echoing the current attempt to the user), so when the attempt variable is set to 0, it is actually the 1st attempt and so on. Another option would be to increase the attempt number at the beginning of the while-do block instead.
Check the screenshot in the PR – in the current implementation, it shows "attempt 0/20", which is nonsense.
This PR fixes an issue where the attempt number was offset in the console output, causing the first attempt to dismiss the privacy modal to be displayed as 0/20 instead of 1/20 and so on.