]> git.armaanb.net Git - opendoas.git/blobdiff - doas.c
Further improve syntax error reporting in doas:
[opendoas.git] / doas.c
diff --git a/doas.c b/doas.c
index 004076cf62e018d4a48eab07384d188d45a3235e..00292e3de3dbd125708e342279b5d28f9258a6a3 100644 (file)
--- a/doas.c
+++ b/doas.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: doas.c,v 1.19 2015/07/22 05:37:23 deraadt Exp $ */
+/* $OpenBSD: doas.c,v 1.20 2015/07/22 16:35:03 zhuk Exp $ */
 /*
  * Copyright (c) 2015 Ted Unangst <tedu@openbsd.org>
  *
@@ -173,6 +173,8 @@ parseconfig(const char *filename)
 
        yyparse();
        fclose(yyfp);
+       if (parse_errors)
+               exit(1);
 }
 
 static int