mirror of
https://codeberg.org/icewind/haze.git
synced 2026-06-03 09:04:12 +02:00
make 'checkout main' also checkout master
This commit is contained in:
parent
70f2953de9
commit
aa4940dc14
1 changed files with 5 additions and 1 deletions
|
|
@ -5,7 +5,11 @@ use miette::{Context, IntoDiagnostic};
|
|||
use std::fs::read_dir;
|
||||
use std::path::Path;
|
||||
|
||||
pub fn checkout_all<P: AsRef<Path>>(sources_root: P, name: &str) -> Result<()> {
|
||||
pub fn checkout_all<P: AsRef<Path>>(sources_root: P, mut name: &str) -> Result<()> {
|
||||
// "main" and "master" are interchangeable
|
||||
if name == "main" {
|
||||
name = "master";
|
||||
}
|
||||
let apps_dir = sources_root.as_ref().join("apps");
|
||||
for app in read_dir(apps_dir).into_diagnostic()? {
|
||||
let app = app.into_diagnostic()?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue