mirror of
https://github.com/facebook/sapling.git
synced 2025-01-06 04:43:19 +03:00
clidispatch: fix a minor case of debug command detection
Summary: This makes `config|debugconfig` as a debug command. Previously it was not. Reviewed By: singhsrb Differential Revision: D16866460 fbshipit-source-id: f1fcf0777d2fe6c1426f557ae1999710dd722109
This commit is contained in:
parent
62e7989ad9
commit
b49ce531cc
@ -138,7 +138,7 @@ fn command_map<'a>(
|
||||
let config_commands = parse_list(cfg.get("commands", "names").unwrap_or_default());
|
||||
for b_name in config_commands {
|
||||
if let Ok(name) = String::from_utf8(b_name.to_vec()) {
|
||||
let is_debug = name.starts_with("debug");
|
||||
let is_debug = name.split("|").any(|name| name.starts_with("debug"));
|
||||
for name in name.split("|") {
|
||||
command_map.insert(name.to_string(), if is_debug { -i } else { i });
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user