9aef215 Simplier/faster/safer curl version retrieval
📊 Changes
1 file changed (+3 additions, -2 deletions)
View changed files
📝dehydrated (+3 -2)
📄 Description
This fixes#717 by capturing the output into a string for later version extraction.
Additionally, it replaces the subshell calls to head and awk with basic bashread which is 95+ times faster (in my tests, based on 100000
iterations), simpler and safer (no forking that could fail etc).
NOTE: You'll notice I'm not redirecting stderr anymore. Even the oldest
version of curl I could find (4.8 from 2000) still outputs to stdout so I'm
not sure why this is being captured.
Lastly, it also reuses the curl version information previously obtained for the command_version() function.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/dehydrated-io/dehydrated/pull/718
**Author:** [@krayon](https://github.com/krayon)
**Created:** 3/16/2020
**Status:** ❌ Closed
**Base:** `master` ← **Head:** `fix.01.curlcheck`
---
### 📝 Commits (3)
- [`8f0ecc3`](https://github.com/dehydrated-io/dehydrated/commit/8f0ecc3b7286f46da95f98c36179eef88a8108f8) Fix curl check
- [`5e2c53e`](https://github.com/dehydrated-io/dehydrated/commit/5e2c53e0ffe8d9667f036dcbc4568488a6d8f300) Use existing curl version var
- [`9aef215`](https://github.com/dehydrated-io/dehydrated/commit/9aef215bc15df86b624c10fdd367dd6ab42b8afa) Simplier/faster/safer curl version retrieval
### 📊 Changes
**1 file changed** (+3 additions, -2 deletions)
<details>
<summary>View changed files</summary>
📝 `dehydrated` (+3 -2)
</details>
### 📄 Description
This fixes #717 by capturing the output into a string for later version extraction.
Additionally, it replaces the subshell calls to `head` and `awk` with basic
`bash` `read` which is 95+ times faster (in my tests, based on 100000
iterations), simpler and safer (no forking that could fail etc).
**NOTE:** You'll notice I'm not redirecting `stderr` anymore. Even the oldest
version of `curl` I could find (4.8 from 2000) still outputs to `stdout` so I'm
not sure why this is being captured.
Lastly, it also reuses the curl version information previously obtained for the
`command_version()` function.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/dehydrated-io/dehydrated/pull/718
Author: @krayon
Created: 3/16/2020
Status: ❌ Closed
Base:
master← Head:fix.01.curlcheck📝 Commits (3)
8f0ecc3Fix curl check5e2c53eUse existing curl version var9aef215Simplier/faster/safer curl version retrieval📊 Changes
1 file changed (+3 additions, -2 deletions)
View changed files
📝
dehydrated(+3 -2)📄 Description
This fixes #717 by capturing the output into a string for later version extraction.
Additionally, it replaces the subshell calls to
headandawkwith basicbashreadwhich is 95+ times faster (in my tests, based on 100000iterations), simpler and safer (no forking that could fail etc).
NOTE: You'll notice I'm not redirecting
stderranymore. Even the oldestversion of
curlI could find (4.8 from 2000) still outputs tostdoutso I'mnot sure why this is being captured.
Lastly, it also reuses the curl version information previously obtained for the
command_version()function.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.