-
Notifications
You must be signed in to change notification settings - Fork 412
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: handle trailing / in Path.External.drop_prefix (#10465)
* fix: handle trailing / in Path.drop_prefix In a nutshell: # drop_prefix ~prefix:"/a/b/c/" "/a/b/c/d/e" Some "d/e" This improves the test situation on nix (#8203) in the default devshell, because the paths in `OCAMLPATH` can have trailing slashes. More precisely, the `--sanitize-for-tests` options uses `Path.External.drop_prefix` to replace elements of `OCAMLPATH` by the `FINDLIB` string. If `OCAMLPATH` contains paths with trailing slashes, these prefixes are not sanitized properly. Signed-off-by: Etienne Millon <me@emillon.org> * refactor: get rid of [Path.External.drop_prefix] Just as easily replaced by [Path.drop_prefix]. None of its uses were performance critical, so the reduced complexity is more important here. Signed-off-by: Rudi Grinberg <me@rgrinberg.com> Co-authored-by: Rudi Grinberg <me@rgrinberg.com>
- Loading branch information
Showing
4 changed files
with
21 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters