Skip to content

Commit

Permalink
Translate /etc/fstab
Browse files Browse the repository at this point in the history
  • Loading branch information
dra27 committed Feb 15, 2024
1 parent db04e53 commit 33010d7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/state/opamSysInteract.ml
Original file line number Diff line number Diff line change
Expand Up @@ -279,17 +279,17 @@ module Cygwin = struct
let set_fstab_noacl =
let orig = "binary," in
let re = Re.compile (Re.str orig) in
fun () ->
let file = OpamFilename.of_string "/etc/fstab" in
let content = OpamFilename.read file in
fun fstab ->
let content = OpamFilename.read fstab in
let content = Re.replace_string re ~by:("noacl,"^orig) content in
OpamFilename.with_open_out_bin_atomic file
OpamFilename.with_open_out_bin_atomic fstab
(fun oc -> Stdlib.output_string oc content)

let install ~packages =
let open OpamProcess.Job.Op in
let cygwin_root = internal_cygroot () in
let cygwin_bin = cygwin_root / "bin" in
let fstab = cygwin_root / "etc" // "fstab" in
let cygcheck = cygwin_bin // cygcheckexe in
let local_cygwin_setupexe = cygsetup () in
if OpamFilename.exists cygcheck then
Expand Down Expand Up @@ -327,7 +327,7 @@ module Cygwin = struct
(OpamFilename.to_string local_cygwin_setupexe)
args @@> fun r ->
OpamSystem.raise_on_process_error r;
set_fstab_noacl ();
set_fstab_noacl fstab;
Done ());
cygcheck

Expand Down

0 comments on commit 33010d7

Please sign in to comment.