mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-01-13 23:23:32 +01:00
[PR #718] [CLOSED] Fix curl check regression and simplify #904
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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.