Skip to content

Commit b2c44c1

Browse files
committed
Print 'git clone' output
1 parent 58579ec commit b2c44c1

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

lib/shell/shell.ml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
let proc cmd =
2+
Printf.eprintf "🐚 %s\n%!" cmd;
3+
let _exit_code = Unix.system cmd in
4+
()
5+
16
let collect_chan (channel : in_channel) : string =
27
let rec loop acc =
38
match input_line channel with

lib/shell/shell.mli

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
1+
(** Run a given string as an external process with arguments.
2+
3+
Redirect the called process stdout and stderr to the current process stdout.
4+
5+
Also print the command with a pretty prompt.
6+
7+
*)
8+
val proc : string -> unit
9+
110
(** Run the given CLI command as external process and collect its stdout to the resulting string. *)
211
val proc_stdout : string -> string

lib/tui/tui.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ let clone_repo ~repo ~local_path =
1414
Printf.sprintf "git clone git@github.com:%s/%s.git %s" owner repo
1515
temp_dir
1616
in
17-
let _ = Shell.proc_stdout cmd in
17+
Shell.proc cmd;
1818
temp_dir
1919

2020
let read_root_tree ~root_dir_path =

0 commit comments

Comments
 (0)