2 ms·
> - Auto follow HTTP redirects by providing -L option by default The script already passes "--location", the non-shortened version of the argument. For the ot
by zamadatix 2y ago
> - Auto follow HTTP redirects by providing -L option by default
The script already passes "--location", the non-shortened version of the argument.
For the other things maybe the both safer and more scalable approach is the script should see if it's being run interactively and default to interactively prompting the user for what action to take on detectable things (like missing basic auth or invalid certs for secure domains) or logging an example version of the same command to run as part of the stderr output otherwise. Apart from avoiding debate by taking a stance on what the default should be this will still be allowed by e.g. the Debian repo maintainers.
- firesteelrain 2y agoGood point on —location. I normally use -L. So I missed that It does default to https as the proto-default if no scheme is provided - in your example it could default to interactively asking the user however this may fail in automated scenarios and/or hang. Anyways it’s a good thought exercise. It’s hard to satisfy all use cases equally