Skip to content

Commit

Permalink
fix: Optimize the "News" function and avoid unexpected behaviors (#213)
Browse files Browse the repository at this point in the history
This commit brings multiple improvements to the "News" function of the main script in order to optimize it and avoid unexpected behaviors:

- Print a message when Arch-Update is looking for recent Arch News (to avoid people thinking the script is just stuck in case it takes some time due to network instability/slowness)
- Print a message if no recent Arch News has been found since the last run
- Optimize the curl requests by merging the two first ones into a single one
- Add a default 30 sec timeout (`--max-time 30`) to curl requests so they don't end taking multiple minutes on slow/faulty network connection). If the timeout is reached, Arch-Update prints a warning explaining that it wasn't able to retrieve Arch News in a reasonable time, prints the URL of the Arch website or the URL of the selected news (so users can still look that up separately) and move on to the packages updates.

Fixes #206
  • Loading branch information
Antiz96 authored Jul 9, 2024
1 parent 814c489 commit a16a160
Show file tree
Hide file tree
Showing 3 changed files with 292 additions and 217 deletions.
Loading

0 comments on commit a16a160

Please sign in to comment.