Command-line-friendly version of locate-project #8009
Labels
A-console-output
Area: Terminal output, colors, progress bar, etc.
A-json-output
Area: JSON message output
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Command-locate-project
Describe the problem you are trying to solve
cargo locate-project
andcargo metadata
both return JSON output, which may be easiest when writing programs to parse it, but it is much more difficult to use in simple shell scripts.Describe the solution you'd like
A
--output-format
flag or similar might be the neatest way to solve this. For example,cargo locate-project --output-format minimal
(or something similar) would return just the path toCargo.toml
. It could also be formatted asroot path
or something similar, allowing the use ofgrep
+cut
for parsing, and would be more generalizable and allow for future extensionlocate-project
.Additionally, this sort of flag could also be extended to other commands and formats, as needed.
The text was updated successfully, but these errors were encountered: