The open build downloads a tar and the git checkout aborts the build. So test if the git directory exist and only then do the checkout.