From 06420628551c88520ad344cf9441d964d02260dc Mon Sep 17 00:00:00 2001 From: pboutill Date: Tue, 12 Jun 2012 13:10:22 +0000 Subject: bug 2805: Only export CAMLP4LIB if camlp4 -where ends successfully git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@15434 85f007b7-540e-0410-9357-904b9bb8a0f7 --- lib/envars.ml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/envars.ml') diff --git a/lib/envars.ml b/lib/envars.ml index 71525f055..1190e7a36 100644 --- a/lib/envars.ml +++ b/lib/envars.ml @@ -185,7 +185,7 @@ let camlp4lib () = else let camlp4bin = camlp4bin () in let com = (Filename.concat camlp4bin Coq_config.camlp4) ^ " -where" in - let _,res = CUnix.run_command (fun x -> x) (fun _ -> ()) com in - Util.strip res - - + let ex,res = CUnix.run_command (fun x -> x) (fun _ -> ()) com in + match ex with + |Unix.WEXITED 0 -> Util.strip res + |_ -> "/dev/null" -- cgit v1.2.3