Add `-f' option to updater.sh for local user.js #2010
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.
Add the option `-f' to the updater.sh script to allow users to specify a path in local disk to an up-to-date user.js file. If specified, this option overrides the default behavior of downloading the latest user.js file.
This option was created due to GitHub blocking file downloads for users that are not logged in1. This is the same issue #2009 is aiming to solve.
As the title suggests, this new option was added to
updater.shonly, and was not added toupdater.bat. Since this problem affects both *nix and Windows users, perhaps it'd be a good idea to have it there, too. I can spin up my Windows VM and add the option there, too, if the repository maintainers would like.I should also mention that this does not change the current behavior when downloading the updated
user.jsfile and exiting the script right after with option-r. This choice was deliberate, as I believe those cloning this repository would already have the latest file. The purpose of the changes imposed by this pull request are to assist those who have cloned the repository and would not like to connect to the Internet again. Likewise, this does not change the behavior when checking for updater.sh.This issue could also be fixed by passing GitHub logged in cookies to curl, similar to the way yt-dlp does.
Footnotes
https://github.com/orgs/community/discussions/159123 ↩