Skip to content

Commit

Permalink
Merge pull request #5831 from dra27/developer-mode
Browse files Browse the repository at this point in the history
Recommend Developer Mode on Windows
  • Loading branch information
kit-ty-kate authored Feb 12, 2024
2 parents 2122af0 + b715a82 commit e43b682
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ users)

## Init
* Add rsync package to internal Cygwin packages list (enables local pinning and is used by the VCS backends [#5808 @dra27]
* Recommend enabling Developer Mode on Windows [#5831 @dra27]

## Config report

Expand Down
10 changes: 10 additions & 0 deletions src/client/opamClient.ml
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,16 @@ let git_for_windows_check =
git_location

let windows_checks ?cygwin_setup ?git_location config =
if (not (Unix.has_symlink ())) then begin
OpamConsole.header_msg "Windows Developer Mode";
OpamConsole.msg "opam does not require Developer Mode to be enabled on Windows, but it is\n\
recommended, in particular because it enables support for symlinks without\n\
requiring opam to be run elevated (which we do %s recommend doing).\n\
\n\
More information on enabling Developer Mode may be obtained from\n\
https://learn.microsoft.com/en-gb/windows/apps/get-started/enable-your-device-for-development\n"
(OpamConsole.colorise `bold "not")
end;
let vars = OpamFile.Config.global_variables config in
let env =
List.map (fun (v, c, s) -> v, (lazy (Some c), s)) vars
Expand Down

0 comments on commit e43b682

Please sign in to comment.