Open
Description
Problem
$ cargo add ../testlib
error: invalid character `.` in package name: `../testlib`, the first character must be a Unicode XID start character (most letters or `_`)
Ideally, when given an argument containing a path separator (which is never valid in a crate name), cargo add
could automatically assume --path
if the specified path exists as a directory.
If there's a compatibility reason why we can't do that, then at a minimum cargo add
could suggest --path
. But I think we could reasonably infer that and proceed.
Proposed Solution
When cargo add
receives an argument containing a path separator, rather than erroring, cargo add
should infer --path
and proceed.
Notes
No response