X-Original-To: alpine-devel@lists.alpinelinux.org Received: from mail.wilcox-tech.com (mail.wilcox-tech.com [45.32.83.9]) by lists.alpinelinux.org (Postfix) with ESMTP id 147E9F81474 for ; Tue, 25 Jun 2019 04:06:36 +0000 (UTC) Received: (qmail 24624 invoked from network); 25 Jun 2019 04:06:32 -0000 Received: from localhost (HELO ?IPv6:2600:1702:2a80:1b9f:5bbc:af4c:5dd1:a183?) (awilcox@wilcox-tech.com@127.0.0.1) by localhost with ESMTPA; 25 Jun 2019 04:06:32 -0000 To: alpine-dev From: "A. Wilcox" Subject: [alpine-devel] APK Tools: exit code for list applet? Openpgp: preference=signencrypt Message-ID: Date: Mon, 24 Jun 2019 23:06:16 -0500 User-Agent: Mozilla/5.0 (X11; Linux ppc64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3uynsIkcHXFI26HnOOaAtZCW9jZtMrHPJ" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --3uynsIkcHXFI26HnOOaAtZCW9jZtMrHPJ Content-Type: multipart/mixed; boundary="gPskY1PnME44SzAr2YL8Lz7CMlAdRobsA"; protected-headers="v1" From: "A. Wilcox" To: alpine-dev Message-ID: Subject: APK Tools: exit code for list applet? --gPskY1PnME44SzAr2YL8Lz7CMlAdRobsA Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Hello there, I noticed that when `apk list` does not return any results, it still exits with return code 0. I feel it would be useful for scripts and automation for it to return code 1 if there are no results. This could also be used for something like: apk list -u && printf "Updates are available\n" and various other things. If this is something that is desired, I would be more than happy to try my hand at a patch. Best, --arw --=20 A. Wilcox (awilfox) Open-source programmer (C, C++, Python) https://code.foxkit.us/u/awilfox/ --gPskY1PnME44SzAr2YL8Lz7CMlAdRobsA-- --3uynsIkcHXFI26HnOOaAtZCW9jZtMrHPJ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEjNyWOYPU1SaTSMHHyynLUZIrnRQFAl0RnbsACgkQyynLUZIr nRTJsRAAq+TBba1uCe1xC9RzHfLJMoOGu7tVDm/owNmIjDnGFq1sQVkmjoCfSfpj agX7movMDENu/5kaoAmVeaLifCEGN1lIDdxsuvUaUkplHCw1iDkrLclz477/i+Tq K/4+F1oL2RZUWGgd/xqYnDB7WfmiMwa3/7/j5oT4m/coA2/0XrFWNyzKNmRh4Y+w 8fpp1j/vmnbhHSZYGiD+GE6aXZ/THWmy2c5HsPRip+pIZx6mUdimjX84R/RJXq+7 dQgcybWy8ZkV8p+D7IGLa1aopHMljaOkvjwRuEaoKLf47DgvOl3XZq5D7FTyASUk xqv4jezOjFaD2yBMLSAAoYWf5uxuHdjPYIemyYiM5p5RZdLvnhL/ITrEicxjGl4i bG0X+l+fg0FEIsmERwSLNZmVUYDR5IcXPtPJG59QerhBfkDnVMqQIuUdYJ0ETxu0 Vk6e5UKyNW5nh0eSkM1MZDHh6g8EzT/yAbWV0Z3JqLqm/0AC+3akVSgBK6hcaTZ3 fyPQlXXVxGQuQ2iP+363IE995zMUkG4blH5LcMjf0HoVK1s9Hi2NdbUyorSM+fll Bw0XXxI13GzkzMD8RvU0nONtDGFuei2oaAvX5Dg7duL8QsQVACNX7BeS3SfUYgxo 1RC6DFTME8eN0m0hNfBe3eqt+6uXyZ5/wI461+E13+6xane1Xkg= =UCye -----END PGP SIGNATURE----- --3uynsIkcHXFI26HnOOaAtZCW9jZtMrHPJ-- --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---