Skip to content

The output of ocamlfind query -i-format isn't quoted properly #114

@kit-ty-kate

Description

@kit-ty-kate

Example:

$ opam repo add reloc git+https://github.com/dra27/opam-repository.git#relocatable
$ opam sw create "reloc space" --repos=reloc,default
$ opam install ocamlfind
[...]
∗ installed relocatable-compiler.5.4.1.20251109.1
∗ installed ocamlfind.1.9.8
[...]
$ ocamlfind query -r -predicates native -i-format unix
-I /home/kit_ty_kate/.opam/reloc space/lib/ocaml/unix

With the presence of spaces both in the filepath and between both arguments, users of ocamlfind query -i-format are left with broken shell arguments.

Obviously in this particular case one could change their code to use bare ocamlfind query instead and add the missing -I but it would be nice for existing users of -i-format to not be broken whenever someone has spaces or special shell characters in their paths.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions