Commit 414d9e3
committed
Auto merge of #12722 - lovesegfault:validate-pkg-root, r=weihanglo
refactor(TomlManifest): fail when package_root is not a directory
### What does this PR try to resolve?
Currently, if you're trying to use `TomlManifest::to_real_manifest`, and
you pass in something incorrect as the `package_root`, such as the path
to the package's manifest, you will get a weird error that looks like
this:
```
can't find library `dummy_lib`, rename file to `src/lib.rs` or specify lib.path
```
This is not very helpful, so this change makes us check that
`package_root` is a directory, and reports an error early on if it
isn't.1 file changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1837 | 1837 | | |
1838 | 1838 | | |
1839 | 1839 | | |
| 1840 | + | |
| 1841 | + | |
| 1842 | + | |
| 1843 | + | |
| 1844 | + | |
| 1845 | + | |
| 1846 | + | |
1840 | 1847 | | |
1841 | 1848 | | |
1842 | 1849 | | |
| |||
0 commit comments