summaryrefslogtreecommitdiff
path: root/contrib/mw-to-git/git-remote-mediawiki.perl
diff options
context:
space:
mode:
authorCélestin Matte <celestin.matte@ensimag.fr>2013-06-14 13:50:27 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-06-14 16:02:17 (GMT)
commitee25ff2c978799519b7705ce1f1d786618ead8d8 (patch)
tree706498b4ba5233f23c5f6790b2621aea45d53ba1 /contrib/mw-to-git/git-remote-mediawiki.perl
parent4f1b7883bc9b614f3a91eff7aa46cfdc85156ceb (diff)
downloadgit-ee25ff2c978799519b7705ce1f1d786618ead8d8.zip
git-ee25ff2c978799519b7705ce1f1d786618ead8d8.tar.gz
git-ee25ff2c978799519b7705ce1f1d786618ead8d8.tar.bz2
git-remote-mediawiki: check return value of open
Signed-off-by: Célestin Matte <celestin.matte@ensimag.fr> Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/mw-to-git/git-remote-mediawiki.perl')
-rwxr-xr-xcontrib/mw-to-git/git-remote-mediawiki.perl3
1 files changed, 2 insertions, 1 deletions
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>