aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorGravatar Emilio Jesus Gallego Arias <e+git@x80.org>2018-06-28 17:57:52 +0200
committerGravatar Emilio Jesus Gallego Arias <e+git@x80.org>2018-06-28 17:57:52 +0200
commitd46dd57462650d1e956d8e80d5aa4e537205de4d (patch)
tree4d8412bfd0b026ae1764afc3b19d9171075ef131 /lib
parent1fab152558a941c500067599d6b2043e1176a446 (diff)
parentde90280aa0895d5b302a3137a3fa1a171a9f127c (diff)
Merge PR #7860: Fix #7704: Launching coqide through PATH fails.
Diffstat (limited to 'lib')
-rw-r--r--lib/system.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/system.ml b/lib/system.ml
index f109c7192..eef65a4e3 100644
--- a/lib/system.ml
+++ b/lib/system.ml
@@ -302,7 +302,7 @@ let with_time ~batch f x =
raise e
let get_toplevel_path top =
- let dir = Filename.dirname Sys.argv.(0) in
+ let dir = Filename.dirname Sys.executable_name in
let exe = if Sys.(os_type = "Win32" || os_type = "Cygwin") then ".exe" else "" in
let eff = if Dynlink.is_native then ".opt" else ".byte" in
dir ^ Filename.dir_sep ^ top ^ eff ^ exe