Do not output anything when no repos found
This commit is contained in:
16
src/lib.rs
16
src/lib.rs
@@ -631,13 +631,19 @@ pub fn run() {
|
|||||||
process::exit(1);
|
process::exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
let config = Config {
|
let trees = vec![find_in_tree(path).unwrap()];
|
||||||
trees: vec![find_in_tree(path).unwrap()],
|
if trees.iter().all(|t| match &t.repos {
|
||||||
};
|
None => false,
|
||||||
|
Some(r) => r.is_empty(),
|
||||||
|
}) {
|
||||||
|
print_warning("No repositories found");
|
||||||
|
} else {
|
||||||
|
let config = Config { trees };
|
||||||
|
|
||||||
let toml = toml::to_string(&config).unwrap();
|
let toml = toml::to_string(&config).unwrap();
|
||||||
|
|
||||||
print!("{}", toml);
|
print!("{}", toml);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
cmd::SubCommand::Worktree(args) => {
|
cmd::SubCommand::Worktree(args) => {
|
||||||
let dir = match std::env::current_dir() {
|
let dir = match std::env::current_dir() {
|
||||||
|
|||||||
Reference in New Issue
Block a user