Commit Diff


commit - 99437157b9e800c9893cc896f72c552613dd0cbd
commit + 80d5f1347d70550d49d95b6420ca27877d1221e8
blob - b0622d7e7922159864c1eb5833a27896e1480bad
blob + 6b957753fc295cbe24b91cba4931258c90bdbd2d
--- got/got.c
+++ got/got.c
@@ -143,7 +143,7 @@ main(int argc, char *argv[])
 			got_commands[i].cmd_usage();
 
 		error = got_commands[i].cmd_main(argc, argv);
-		if (error) {
+		if (error && !(sigint_received || sigpipe_received)) {
 			fprintf(stderr, "%s: %s\n", getprogname(), error->msg);
 			return 1;
 		}
blob - d33d70db40ff1313b717c0429c1b3ac7209086d0
blob + d45817fbc3bc2a3022fa504990abbe4ad1fc9bdc
--- libexec/got-read-blob/got-read-blob.c
+++ libexec/got-read-blob/got-read-blob.c
@@ -158,9 +158,10 @@ done:
 
 	imsg_clear(&ibuf);
 	if (err) {
-		fprintf(stderr, "%s: %s\n", getprogname(), err->msg);
-		if (!sigint_received && err->code != GOT_ERR_PRIVSEP_PIPE)
+		if (!sigint_received && err->code != GOT_ERR_PRIVSEP_PIPE) {
+			fprintf(stderr, "%s: %s\n", getprogname(), err->msg);
 			got_privsep_send_error(&ibuf, err);
+		}
 	}
 	close(GOT_IMSG_FD_CHILD);
 	return err ? 1 : 0;
blob - 56aac6aa18b45fe6f13d9723d5bfbdb18fc6024a
blob + 9ebca90a5bf3e71ea9503fc697e1aa8fa2034493
--- libexec/got-read-commit/got-read-commit.c
+++ libexec/got-read-commit/got-read-commit.c
@@ -174,9 +174,10 @@ done:
 
 	imsg_clear(&ibuf);
 	if (err) {
-		fprintf(stderr, "%s: %s\n", getprogname(), err->msg);
-		if (!sigint_received && err->code != GOT_ERR_PRIVSEP_PIPE)
+		if (!sigint_received && err->code != GOT_ERR_PRIVSEP_PIPE) {
+			fprintf(stderr, "%s: %s\n", getprogname(), err->msg);
 			got_privsep_send_error(&ibuf, err);
+		}
 	}
 	close(GOT_IMSG_FD_CHILD);
 	return err ? 1 : 0;
blob - 8f4ccd362c7963a8af97740e51adb99adef55a5f
blob + 2d71593449dcec3346db75b88284633ceb55db6d
--- libexec/got-read-object/got-read-object.c
+++ libexec/got-read-object/got-read-object.c
@@ -219,9 +219,10 @@ done:
 
 	imsg_clear(&ibuf);
 	if (err) {
-		fprintf(stderr, "%s: %s\n", getprogname(), err->msg);
-		if(!sigint_received && err->code != GOT_ERR_PRIVSEP_PIPE)
+		if(!sigint_received && err->code != GOT_ERR_PRIVSEP_PIPE) {
+			fprintf(stderr, "%s: %s\n", getprogname(), err->msg);
 			got_privsep_send_error(&ibuf, err);
+		}
 	}
 	close(GOT_IMSG_FD_CHILD);
 	return err ? 1 : 0;
blob - debf11401b6553196d83b1b302a0426e77b030a6
blob + 24f359a343b084dcfe5e2654c1b4ae57fcaa9e05
--- libexec/got-read-pack/got-read-pack.c
+++ libexec/got-read-pack/got-read-pack.c
@@ -507,9 +507,10 @@ main(int argc, char *argv[])
 	got_object_cache_close(&objcache);
 	imsg_clear(&ibuf);
 	if (err) {
-		fprintf(stderr, "%s: %s\n", getprogname(), err->msg);
-		if (!sigint_received && err->code != GOT_ERR_PRIVSEP_PIPE)
+		if (!sigint_received && err->code != GOT_ERR_PRIVSEP_PIPE) {
+			fprintf(stderr, "%s: %s\n", getprogname(), err->msg);
 			got_privsep_send_error(&ibuf, err);
+		}
 	}
 	close(GOT_IMSG_FD_CHILD);
 	return err ? 1 : 0;
blob - 176d429702fa94a803327cbdae31975f748bf235
blob + 903095414259a021732dadea645c9ce41f06554a
--- libexec/got-read-tree/got-read-tree.c
+++ libexec/got-read-tree/got-read-tree.c
@@ -172,9 +172,10 @@ done:
 
 	imsg_clear(&ibuf);
 	if (err) {
-		fprintf(stderr, "%s: %s\n", getprogname(), err->msg);
-		if (!sigint_received && err->code != GOT_ERR_PRIVSEP_PIPE)
+		if (!sigint_received && err->code != GOT_ERR_PRIVSEP_PIPE) {
+			fprintf(stderr, "%s: %s\n", getprogname(), err->msg);
 			got_privsep_send_error(&ibuf, err);
+		}
 	}
 	close(GOT_IMSG_FD_CHILD);
 	return err ? 1 : 0;