Skip to content

Commit a6eefe6

Browse files
committed
Explicitly set the escape parser directive on Windows
1 parent 629f5f7 commit a6eefe6

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src-opam/opam.ml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ let from ?win10_revision ?arch ?maintainer ?img ?tag d =
177177
let header ?win10_revision ?arch ?maintainer ?img ?tag d =
178178
let parser_directives =
179179
match D.os_family_of_distro d with
180-
| `Windows | `Cygwin -> parser_directive (`Escape '`')
180+
| `Windows | `Cygwin -> empty
181181
| _ -> buildkit_syntax
182182
in
183183
parser_directives
@@ -448,7 +448,9 @@ let windows_mingw_opam2 ?win10_revision ?winget ?(labels = []) ?arch
448448
let extra, pkgs = Windows.Cygwin.ocaml_for_windows_packages ~extra () in
449449
Windows.Cygwin.install_cygwin ~msvs_tools:true ~extra () @@ pkgs
450450
in
451-
winget_image @@ opams_image
451+
parser_directive (`Escape '`')
452+
@@ comment "Autogenerated by OCaml-Dockerfile scripts"
453+
@@ winget_image @@ opams_image
452454
@@ header ?win10_revision ?arch distro
453455
@@ label (("distro_style", "windows") :: labels)
454456
@@ user "ContainerAdministrator"
@@ -493,7 +495,9 @@ let windows_msvc_opam2 ?win10_revision ?winget ?(labels = []) ~opam_hashes
493495
Windows.Cygwin.install_cygwin ~msvs_tools:true ~extra ()
494496
@@ vs_build_tools @@ pkgs
495497
in
496-
winget_image @@ opams_image
498+
parser_directive (`Escape '`')
499+
@@ comment "Autogenerated by OCaml-Dockerfile scripts"
500+
@@ winget_image @@ opams_image
497501
@@ header ?win10_revision ?arch distro
498502
@@ label (("distro_style", "windows") :: labels)
499503
@@ user "ContainerAdministrator"

src-opam/windows.ml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,7 @@ let header ~alias ?win10_revision
8282
?(version =
8383
(Distro.win10_latest_image : Distro.win10_release :> Distro.win_all)) () =
8484
let img, tag = Distro.win10_base_tag ?win10_revision `Windows version in
85-
parser_directive (`Escape '`')
86-
@@ from ~alias ~tag img
87-
@@ user "ContainerAdministrator"
85+
from ~alias ~tag img @@ user "ContainerAdministrator"
8886

8987
let sanitize_reg_path () =
9088
run

0 commit comments

Comments
 (0)