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

Normalize --path when install bin outside current workspace #10335

Merged
merged 3 commits into from
Jan 27, 2022

Commits on Jan 27, 2022

  1. Test: install with path outside current workspace

    Make up this test case to reflect the current incorrect behavior.
    weihanglo committed Jan 27, 2022
    Configuration menu
    Copy the full SHA
    d323ad6 View commit details
    Browse the repository at this point in the history
  2. Normalize --path to install bin outside current workspace

    For `Workspace::find_root`, `cargo_util::path::PathAncestors` won't do
    path normalization while walking back the ancestors. The responsibility
    lies in the caller. Thus, `cargo install` should normalize its `--path`
    argument before passing in `SourceId::for_path` and `Workspace::new`.
    
    `Config::reload_rooted_at` is not affected because cargo always starts
    searching and merging configs from where it is invoked.
    weihanglo committed Jan 27, 2022
    Configuration menu
    Copy the full SHA
    44f650f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    76301eb View commit details
    Browse the repository at this point in the history