mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
22 lines
437 B
Rust
22 lines
437 B
Rust
use command_prelude::*;
|
|
|
|
use cargo::print_json;
|
|
|
|
pub fn cli() -> App {
|
|
subcommand("read-manifest")
|
|
.about(
|
|
"\
|
|
Print a JSON representation of a Cargo.toml manifest.
|
|
|
|
Deprecated, use `cargo metadata --no-deps` instead.\
|
|
",
|
|
)
|
|
.arg_manifest_path()
|
|
}
|
|
|
|
pub fn exec(config: &mut Config, args: &ArgMatches) -> CliResult {
|
|
let ws = args.workspace(config)?;
|
|
print_json(&ws.current()?);
|
|
Ok(())
|
|
}
|