Skip to content

ocaml script mode, some errors are reported on stdout and do not lead to non-zero exit #7202

@vicuna

Description

@vicuna

Original bug ID: 7202
Reporter: @dbuenzli
Status: confirmed (set by @damiendoligez on 2016-04-05T14:34:13Z)
Resolution: open
Priority: normal
Severity: minor
Version: 4.02.3
Category: toplevel
Monitored by: @hcarty @dbuenzli

Bug description

This seems right:

> cat script.ml 
#!/usr/bin/env ocaml

let (
> ocaml script.ml > /tmp/bla
File "script.ml", line 4, characters 0-0:
Error: Syntax error: operator expected.

> echo $?
2

However if I have:

> cat script.ml
#!/usr/bin/env ocaml

#mod_use "bli.ml"

> ocaml script.ml > /tmp/bla
> echo $?
0
> cat /tmp/bla
Cannot find file bli.ml.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions