Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/dismiss_privacy_modal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ third_screen_dismissed=false
while [ $attempt -lt $max_attempts ]; do
# 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)..."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get it why should be display attempt + 1 value here instead of just the actual attempt?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.


# Handle first screen if not yet dismissed
if [[ "$first_screen_dismissed" == "false" ]]; then
Expand Down
Loading