Skip to content

Commit

Permalink
Merge pull request #3109 from OCamlPro/undef-empty
Browse files Browse the repository at this point in the history
In commands, resolve undefined to "" rather than no argument
  • Loading branch information
AltGr authored Nov 23, 2017
2 parents 612988b + eba5bb5 commit 1764fe7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions doc/pages/Manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,9 @@ files.
detect that the package is not installed from a release tarball, and may
need additional preprocessing (_e.g._ `automake`).

If a term is undefined (_e.g._ an undefined variable), the empty string is
used as positional argument.

- <a id="opamfield-install">
`install: [ [ <term> { <filter> } ... ] { <filter> } ... ]`</a>:
the list of commands that will be run in order to install the package.
Expand Down
2 changes: 1 addition & 1 deletion src/format/opamFilter.ml
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ let arguments env (a,f) =
| Some (S s) -> [s]
| Some (B b) -> [string_of_bool b]
| Some (L sl) -> sl
| None -> log "ERR in replacement: undefined ident %S" i; []
| None -> log "ERR in replacement: undefined ident %S" i; [""]
else
[]

Expand Down

0 comments on commit 1764fe7

Please sign in to comment.