diff options
author | Célestin Matte <celestin.matte@ensimag.fr> | 2013-06-14 15:50:27 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-06-14 09:02:17 -0700 |
commit | ee25ff2c978799519b7705ce1f1d786618ead8d8 (patch) | |
tree | 706498b4ba5233f23c5f6790b2621aea45d53ba1 /contrib/mw-to-git | |
parent | git-remote-mediawiki: assign a variable as undef and make proper indentation (diff) | |
download | tgif-ee25ff2c978799519b7705ce1f1d786618ead8d8.tar.xz |
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')
-rwxr-xr-x | contrib/mw-to-git/git-remote-mediawiki.perl | 3 |
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 d1cddabd69..82684f385d 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> |