Skip to content

Commit

Permalink
Disable ACL in Cygwin to avoid permission missmatch errors
Browse files Browse the repository at this point in the history
  • Loading branch information
kit-ty-kate committed Jan 22, 2024
1 parent 73c671f commit 7674096
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/state/opamSysInteract.ml
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,12 @@ module Cygwin = struct
in
OpamDownload.download_as ~overwrite ?checksum url_setupexe dst

let set_fstab_noacl root =
let bash = root / "bin" // "bash.exe" in
OpamSystem.make_command
(OpamFilename.to_string bash)
["-c"; "/bin/sed -i -e 's/binary,/noacl,&/' /etc/fstab"]

let install ~packages =
let open OpamProcess.Job.Op in
let cygwin_root = internal_cygroot () in
Expand Down Expand Up @@ -317,6 +323,8 @@ module Cygwin = struct
(OpamFilename.to_string local_cygwin_setupexe)
args @@> fun r ->
OpamSystem.raise_on_process_error r;
set_fstab_noacl cygwin_root @@> fun r ->
OpamSystem.raise_on_process_error r;
Done ());
cygcheck

Expand Down

0 comments on commit 7674096

Please sign in to comment.