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

Fix --manifest-path Cargo.toml #929

Merged
merged 1 commit into from
Jun 1, 2024

Conversation

Finomnis
Copy link
Contributor

@Finomnis Finomnis commented Jun 1, 2024

Fixes #928.

Observation

  • --manifest-path ./Cargo.toml works
  • --manifest-path Cargo.toml does not:
    Unable to run the check command: 'cargo check' at ''
    

Cause

  • path.parent() yields an empty string for Cargo.toml

Proposed solution

  • path.canonicalize().parent().

Why this is a problem

  • --manifest-path Cargo.toml is an accepted flag for normal cargo. In my case it caused an error in combination with minimal-versions, which adds --manifest-path Cargo.toml to the command:
    cargo minimal-versions msrv verify
    
    which fails without this PR, and succeeds with it.

Copy link

codecov bot commented Jun 1, 2024

Codecov Report

Attention: Patch coverage is 0% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 73.46%. Comparing base (072b299) to head (980e79a).
Report is 83 commits behind head on main.

Files Patch % Lines
src/context.rs 0.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #929      +/-   ##
==========================================
- Coverage   73.60%   73.46%   -0.14%     
==========================================
  Files          81       80       -1     
  Lines        5626     5548      -78     
==========================================
- Hits         4141     4076      -65     
+ Misses       1485     1472      -13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@foresterre foresterre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@foresterre foresterre merged commit c1f04b2 into foresterre:main Jun 1, 2024
15 checks passed
@Finomnis Finomnis deleted the fix_manifest_without_parent branch June 1, 2024 13:09
@Finomnis
Copy link
Contributor Author

Finomnis commented Jun 1, 2024

@foresterre would you mind releasing a .21 with it soon? I kind of need it for the CI of a project of mine :)

@foresterre
Copy link
Owner

foresterre commented Jun 2, 2024

Absolutely. Thanks again!

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.

Error when --manifest-path Cargo.toml
2 participants