Skip to content

Commit

Permalink
feat: check for gitea undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
ElderMatt committed Dec 12, 2023
1 parent 6033ec3 commit 0cda52c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/operator/gitea.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ async function execGiteaCLICommand(object: k8s.V1Pod) {
const giteaContainer = containerStatuses.find((container) => container.name === 'gitea')
// Check if the gitea container is 'READY'
console.debug('GiteaContainer: ', giteaContainer)
if (giteaContainer && !giteaContainer.ready) {
if (giteaContainer === undefined) {
console.debug('Gitea container is not found')
return
}
if (!giteaContainer?.ready) {
console.debug('Gitea container is not ready: ', giteaContainer.state!)
return
}
Expand Down

0 comments on commit 0cda52c

Please sign in to comment.