tarides / ocaml-platform-installer

The best way for developers to write software in OCaml
ISC License
61 stars 8 forks source link

Fixing errors logging, Adding dependencies and link to Up and Running to the README #84

Closed panglesd closed 2 years ago

panglesd commented 2 years ago

The error message in case of missing dependency in ocaml-platform is not explicit at all: For instance, if patch and unzip are missing, here would be the outputs:

In non verbose and verbose:

root@9acca02b34cb:/# ocaml-platform 
ocaml-platform: [ERROR] Command 'opam init --yes -q --color=never --root /root/.opam' failed: exited with 50
root@9acca02b34cb:/# ocaml-platform -v
ocaml-platform: [ERROR] Command 'opam init --yes -q --color=never --root /root/.opam' failed: exited with 50

and in very verbose mode

root@6906f5bf3e4a:/# ocaml-platform -vv
ocaml-platform: [DEBUG] Running: 'opam' 'init' '--yes' '-q' '--color=never' '--root' '/root/.opam'
ocaml-platform: [DEBUG] Error in execution:   - unzip
  - patch
[ERROR] Missing dependencies -- the following commands are required for opam to operate:
[WARNING] Running as root is not recommended
ocaml-platform: [ERROR] Command 'opam init --yes -q --color=never --root /root/.opam' failed: exited with 50

This PR does 3 things:

What do you think? I am not sure the inclusion in the README is important, but I think the two other points are improvements.