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

Switch name check #4237

Merged
merged 5 commits into from
Jul 9, 2020
Merged

Switch name check #4237

merged 5 commits into from
Jul 9, 2020

Conversation

rjbou
Copy link
Collaborator

@rjbou rjbou commented Jun 18, 2020

  • Switch names (global or local directories) containing | '<' | '>' | '!' | '<backquote>' | '$' | '(' | ')' | ':', or empty are rejected. For windows compatibility, switch names that begin with \w:/ & \w:\ are allowed. Empty switche names are forbidden.
    • Compliance regexp is ^(\w:/\\)?[^<>!$():]+$ (missing the backquote because of markdown) cf. code
  • Update opam installer to not use an empty switch to retrieve needed paths
  • Cherry-picked context-free switch paths from Remove dependency on state value for opam2nix use cases #4147
  • fix opam env OPAMSWITCH setting: if empty string, consider it as unset

fix #4231

@rjbou edit: update content

@rjbou rjbou added this to the 2.1.0~alpha2 milestone Jun 18, 2020
@rjbou rjbou marked this pull request as draft June 25, 2020 10:51
@rjbou rjbou marked this pull request as ready for review June 25, 2020 13:38
@rjbou rjbou force-pushed the swname-check branch 2 times, most recently from 9865b06 to 441baef Compare June 29, 2020 18:03
@rjbou rjbou marked this pull request as draft July 1, 2020 16:09
@rjbou
Copy link
Collaborator Author

rjbou commented Jul 2, 2020

Appveyor failure lightened something: should we allow local switches at system root, e.g. / or C:\?

@rjbou rjbou added the PR: WIP Not for merge at this stage label Jul 2, 2020
@rjbou rjbou requested a review from AltGr July 3, 2020 12:17
@rjbou rjbou removed the PR: WIP Not for merge at this stage label Jul 3, 2020
@rjbou rjbou marked this pull request as ready for review July 3, 2020 12:17
@rjbou rjbou merged commit 7f0ac18 into ocaml:master Jul 9, 2020
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.

opam accepts switch names that create unusable switches
2 participants