-- (ReaderT GitConfig (WithErr a)) could be a useful monad here
updateGitRepo :: Text -> P.ProductID -> GitConfig -> WithErr String
updateGitRepo gitUrl prodID gitConfig = do
  let repositoryPath = codeRepositoryDir prodID gitConfig
  doesRepoExist <- liftIO $ doesDirectoryExist repositoryPath
  case doesRepoExist of
    True  -> Git.pull repositoryPath
    False -> Git.clone repositoryPath gitUrl
updateGitRepo :: Text -> P.ProductID -> GitConfig -> WithErr String
updateGitRepo gitUrl prodID gitConfig = do
  let repositoryPath = codeRepositoryDir prodID gitConfig
  doesRepoExist <- liftIO $ doesDirectoryExist repositoryPath
  case doesRepoExist of
    True  -> Git.pull repositoryPath
    False -> Git.clone repositoryPath gitUrl
updateGitRepo gitUrl prodID gitConfig = do
  let repositoryPath = codeRepositoryDir prodID gitConfig
  doesRepoExist <- liftIO $ doesDirectoryExist repositoryPath
  case doesRepoExist of
    True  -> Git.pull repositoryPath
    False -> Git.clone repositoryPath gitUrl