Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenldl committed Jun 29, 2024
1 parent 0a0300a commit 0f3d177
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions bin/proc_utils.ml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
open Misc_utils

let command_exists (cmd : string) : bool =
if Sys.win32 then
if Sys.win32 then (
Sys.command (Fmt.str "where %s 2>nul 1>nul" (Filename.quote cmd)) = 0
else
) else (
Sys.command (Fmt.str "command -v %s 2>/dev/null 1>/dev/null" (Filename.quote cmd)) = 0
)

let run_in_background (cmd : string) =
if Sys.win32 then
if Sys.win32 then (
Sys.command (Fmt.str {|start "" %s 2>nul 1>nul &|} cmd)
else
) else (
Sys.command (Fmt.str "%s 2>/dev/null 1>/dev/null &" cmd)
)

let run_return_stdout ~proc_mgr ~fs (cmd : string list) : string list option =
Eio.Path.(with_open_out
Expand Down

0 comments on commit 0f3d177

Please sign in to comment.