aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/system.ml
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2016-02-13 17:36:16 +0100
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2016-02-13 17:51:34 +0100
commit97e1fccd878190a1fc51a1da45f4c06369c0e3db (patch)
tree27e38c1ae4c8ebef7dc7f8f893ccc8f93aee8227 /lib/system.ml
parente9675e068f9e0e92bab05c030fb4722b146123b8 (diff)
parentf46a5686853353f8de733ae7fbd21a3a61977bc7 (diff)
Merge branch 'v8.5'
Diffstat (limited to 'lib/system.ml')
-rw-r--r--lib/system.ml10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/system.ml b/lib/system.ml
index 779e30816..13cfad4ae 100644
--- a/lib/system.ml
+++ b/lib/system.ml
@@ -199,10 +199,12 @@ let is_in_path lpath filename =
with Not_found -> false
let is_in_system_path filename =
- let path = try Sys.getenv "PATH"
- with Not_found -> error "system variable PATH not found" in
- let lpath = CUnix.path_to_list path in
- is_in_path lpath filename
+ try
+ let lpath = CUnix.path_to_list (Sys.getenv "PATH") in
+ is_in_path lpath filename
+ with Not_found ->
+ msg_warning (str "system variable PATH not found");
+ false
let open_trapping_failure name =
try open_out_bin name