🔧 fix: handle case when default target is not set

This commit is contained in:
Nikita Galaiko 2023-10-30 08:54:15 +01:00 committed by GitButler
parent 304ee291aa
commit 2a43aff7de

View File

@ -94,7 +94,12 @@ impl HandlerInner {
user.as_ref(),
)
.context("failed to open repository")?;
let default_target = gb_repo.default_target()?.context("target not set")?;
let default_target = if let Some(target) = gb_repo.default_target()? {
target
} else {
return Ok(vec![]);
};
let credentials = git::credentials::Factory::new(
&project,