ScoopInstaller / Scoop

A command-line installer for Windows.
https://scoop.sh
Other
20.95k stars 1.4k forks source link

scoop config should have a default option to allow user to return a value if no config by the name can be found #4499

Open pratikpc opened 2 years ago

pratikpc commented 2 years ago

In scoop-status.ps1, we are using scoop config SCOOP_BRANCH to get the Scoop branch but if the Scoop branch is not set, then this causes issues.

https://github.com/ScoopInstaller/Scoop/blob/master/libexec/scoop-status.ps1#L20

Would it be possible to instead add a default like option?

scoop config SCOOP_BRANCH --by-default master or something similar?

rashil2000 commented 2 years ago

I would vote against hardcoding a default branch. The default branch should be determined from the Git CLI itself.

pratikpc commented 2 years ago

This is just an example of a place of use.

There definitely are other places where common sense based defaults can and will play a role for obvious reasons.