diff options
| author | Pierre-Marie Pédrot | 2016-02-13 17:36:16 +0100 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2016-02-13 17:51:34 +0100 |
| commit | 97e1fccd878190a1fc51a1da45f4c06369c0e3db (patch) | |
| tree | 27e38c1ae4c8ebef7dc7f8f893ccc8f93aee8227 /lib/system.ml | |
| parent | e9675e068f9e0e92bab05c030fb4722b146123b8 (diff) | |
| parent | f46a5686853353f8de733ae7fbd21a3a61977bc7 (diff) | |
Merge branch 'v8.5'
Diffstat (limited to 'lib/system.ml')
| -rw-r--r-- | lib/system.ml | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/system.ml b/lib/system.ml index 779e308160..13cfad4aef 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 |
