Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revised windows init2 #21

Closed
wants to merge 17 commits into from
Closed

Revised windows init2 #21

wants to merge 17 commits into from

Conversation

dra27
Copy link
Owner

@dra27 dra27 commented Jun 7, 2024

No description provided.

dra27 added 17 commits June 7, 2024 09:20
Although it's not clear that this note is at all necessary - if the user
specifies a CLI option, who cares?
Previously, --git-location was treated as a default answer for the Git
menu. Fix this and validate either --git-location argument or the
git-location opamrc field as referring to a directory which contains
Git.
Rather than filtering git out of the package list, instead add it when
required.
Make the ~cygbin parameter to the various executable identification
functions optional. The parameter is renamed to search_in_first with a
slightly revised semantics - if cygcheck.exe is not found in the
directory, then PATH is still searched.

This has a key benefit early on in opam init, as it allows cygbin to be
set for an internal Cygwin installation which has not yet happened, but
still permits curl (et al) to be used from PATH (e.g. when running opam
init from an MSYS2 shell).

Where before ~cygbin implied that cygcheck _must_ be used from the
directory, the new parameter effectively prepends an additional
directory to PATH.
Previously, MSYS2 required os-distribution to be overridden in
global-variables. Now, as with Cygwin, it is inferred in the same way
from cygcheck.

In this commit, opam init still sets os-distribution, however, if it is
manually removed from the root config file, previously `opam var
os-distribution` would return `win32` but now returns `msys2`.

Additionally, sys_pkg_manager_cmd is handled in the same way for MSYS2
as for Cygwin, allowing MSYS2 to be automatically added in the same way
as Cygwin.
Single argument function with a non-base type.
Includes more checks and also returns the kind of installation which was
found.
@dra27 dra27 closed this Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant