Thread (32 messages) flat view 32 messages, 1 author, 2016-06-15
DORMANTno replies

Revision v6 of 3 in this series.

Revisions (3)
  1. v2 [diff vs current]
  2. v4 [diff vs current]
  3. v6 current

[PATCH v6 19/31] git-remote-mediawiki: Check return value of open

From: Célestin Matte <hidden>
Date: 2016-06-15 22:57:45
Subsystem: the rest · Maintainer: Linus Torvalds

From: Célestin Matte <redacted>

Signed-off-by: Célestin Matte <redacted>
Signed-off-by: Matthieu Moy <redacted>
---
 contrib/mw-to-git/git-remote-mediawiki.perl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl
index d1cddab..82684f3 100755
--- a/contrib/mw-to-git/git-remote-mediawiki.perl
+++ b/contrib/mw-to-git/git-remote-mediawiki.perl
@@ -337,7 +337,8 @@ sub get_mw_pages {
 sub run_git {
 	my $args = shift;
 	my $encoding = (shift || "encoding(UTF-8)");
-	open(my $git, "-|:$encoding", "git " . $args);
+	open(my $git, "-|:$encoding", "git " . $args)
+	    or die "Unable to open: $!\n";
 	my $res = do {
 		local $/ = undef;
 		<$git>
-- 
1.8.3.rc3.49.g4e74807
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help