commit e1e3f5707400e6ae29df113968ebcdff42393d63 from: Stefan Sperling date: Sun Apr 01 18:52:29 2018 UTC replace use of err() with got_error_from_errno() commit - 76089277b17d825c8f55da048c4e98a6a00a5025 commit + e1e3f5707400e6ae29df113968ebcdff42393d63 blob - 7843bcd153e3a49c347d5807271fcbfb6f659e2c blob + 952e0f2d698e92f959a7780c9dbfd3927cc50b23 --- got/got.c +++ got/got.c @@ -473,7 +473,7 @@ cmd_log(int argc, char *argv[]) if (argc == 0) { repo_path = getcwd(NULL, 0); if (repo_path == NULL) - err(1, "getcwd"); + return got_error_from_errno(); } else if (argc == 1) { repo_path = realpath(argv[0], NULL); if (repo_path == NULL) @@ -638,7 +638,7 @@ cmd_diff(int argc, char *argv[]) } else if (argc == 2) { repo_path = getcwd(NULL, 0); if (repo_path == NULL) - err(1, "getcwd"); + return got_error_from_errno(); obj_id_str1 = argv[0]; obj_id_str2 = argv[1]; } else if (argc == 3) {