Open dra27 opened 3 years ago
I think the problem here is that the Dockerfile format just doesn't support this (see https://stackoverflow.com/questions/33439230/how-to-write-commands-with-multiple-lines-in-dockerfile-while-preserving-the-new).
Perhaps we should just reject attempts to convert to Dockerfile format in this case?
Ouch, yes - if there isn't a workaround for here then we should just reject, I agree. I'll open an issue on opam-repo-ci to workaround it.
Oh, there is a possible workaround, remembering horrid things we used to do in OCaml's testsuite - escaping newlines as :; \
certainly works here.
Note that OBuilder allows you to use any shell, so shell-specific hacks won't work here.
Merely picking a recent build from opam-repo-ci.
This fragment from opam-repo-ci:
is rendered:
but it needs semi-colons at the end of most lines. Not sure if escaping is the answer or possibly invoking via a HERE document?!