* [PATCH 2/3] config: urlmatch $? does not influence our exits
2022-11-23 4:09 5% [PATCH 0/3] proxy-related things Eric Wong
@ 2022-11-23 4:09 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2022-11-23 4:09 UTC (permalink / raw)
To: meta
We don't want to leak $? from `git config' failures into
lei nor public-inbox-* processes.
---
lib/PublicInbox/Config.pm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm
index c27928de..6a51226e 100644
--- a/lib/PublicInbox/Config.pm
+++ b/lib/PublicInbox/Config.pm
@@ -544,11 +544,12 @@ sub urlmatch {
my $val = <$fh>;
if (close($fh)) {
chomp($val);
- $val;
} else {
$urlmatch_broken = 1 if (($? >> 8) != 1);
- undef;
+ undef $val;
}
+ $? = 0; # don't influence lei exit status
+ $val;
}
sub json {
^ permalink raw reply related [relevance 7%]
* [PATCH 0/3] proxy-related things
@ 2022-11-23 4:09 5% Eric Wong
2022-11-23 4:09 7% ` [PATCH 2/3] config: urlmatch $? does not influence our exits Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2022-11-23 4:09 UTC (permalink / raw)
To: meta
Several fixes and one improvement I noticed while watching on a
monster branch related to clone/fetch...
Eric Wong (3):
lei_curl: set --proxy for curl(1) properly
config: urlmatch $? does not influence our exits
lei_curl: use http.proxy config from git if available
lib/PublicInbox/Config.pm | 21 ++++++++++++++-------
lib/PublicInbox/LeiCurl.pm | 7 +++----
2 files changed, 17 insertions(+), 11 deletions(-)
^ permalink raw reply [relevance 5%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2022-11-23 4:09 5% [PATCH 0/3] proxy-related things Eric Wong
2022-11-23 4:09 7% ` [PATCH 2/3] config: urlmatch $? does not influence our exits Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).