mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-07 20:17:59 +00:00
Merge pull request #459 from brodie/test-improvements
tests: propagate errors from open_temp_repo() instead of exiting
This commit is contained in:
commit
a014a083d9
@ -217,10 +217,9 @@ int copydir_recurs(const char *source_directory_path, const char *destination_di
|
|||||||
|
|
||||||
int open_temp_repo(git_repository **repo, const char *path)
|
int open_temp_repo(git_repository **repo, const char *path)
|
||||||
{
|
{
|
||||||
if (copydir_recurs(path, TEMP_REPO_FOLDER) < GIT_SUCCESS) {
|
int error;
|
||||||
printf("\nFailed to create temporary folder. Aborting test suite.\n");
|
if ((error = copydir_recurs(path, TEMP_REPO_FOLDER)) < GIT_SUCCESS)
|
||||||
exit(-1);
|
return error;
|
||||||
}
|
|
||||||
|
|
||||||
return git_repository_open(repo, TEMP_REPO_FOLDER);
|
return git_repository_open(repo, TEMP_REPO_FOLDER);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user