pub fn script_command(entry: &Value) -> Option<&Value>Expand description
Returns the executable part of a script entry.
A script may be written in three shapes:
- a bare string:
"cargo build" - an array of commands:
["cargo build", "cargo test"] - an object with metadata:
{ "cmd": <string|array>, "desc": "..." }
For the string/array forms the entry is itself the command; for the object
form the command lives under cmd. Returns None for unsupported shapes.