Commits

Yaron Minsky committed 7114cb2

avoid realpath, shell out to which instead

  • Participants
  • Parent commits e395095

Comments (0)

Files changed (1)

File rule_client.ml

     unstage (throttle (sec 30.) ~if_not_run:(fun () -> Deferred.unit))
   in
   upon stop (fun () -> Pipe.close_read r);
+  Async_shell.run_full "which" [Sys.argv.(0)]
+  >>= fun my_path ->
+  let my_path = String.strip my_path in
   Pipe.iter r ~f:(fun violations ->
       clear_screen ()
       >>= fun () ->
                   (* Command to execute when popup is clicked *)
                   let execute =
                     sprintf "%s rules ack '%s'"
-                      (Filename.realpath Sys.argv.(0))
+                      my_path
                       (Rule.Name.to_string rule.name)
                   in
                   print_endline execute;