summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xvtysh/extract.pl.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/vtysh/extract.pl.in b/vtysh/extract.pl.in
index b7ac0abe02..c4f293fd3b 100755
--- a/vtysh/extract.pl.in
+++ b/vtysh/extract.pl.in
@@ -43,7 +43,9 @@ sub scan_file {
open (FH, "@CPP@ -DHAVE_CONFIG_H -DVTYSH_EXTRACT_PL -Ivtysh/@top_builddir@ -Ivtysh/@top_srcdir@ -Ivtysh/@top_srcdir@/lib -Ivtysh/@top_builddir@/lib -Ivtysh/@top_srcdir@/bgpd -Ivtysh/@top_srcdir@/bgpd/rfapi @LUA_INCLUDE@ @CPPFLAGS@ $cppadd $file |");
local $/; undef $/;
$line = <FH>;
- close (FH);
+ if (!close (FH)) {
+ printf "File: $file failed to compile, when extracting cli from it please inspect\n"
+ }
# ?: makes a group non-capturing
@defun = ($line =~ /((?:DEFUN|DEFUN_HIDDEN|ALIAS|ALIAS_HIDDEN)\s*\(.+?\));?\s?\s?\n/sg);