cfgfoo

git clone https://orangeshoelaces.net/git/cfgfoo.git

2e19da80f90ce7af43c773562c3cdde69f48b1f6

Author: Vasilii Kolobkov on 12/31/2018

Committer: Vasilii Kolobkov on 12/31/2018

Check whether package installation succeeded with 'pkg_info'

Stats

steps/obsd/pkg/add | 4 ++++
1 file changed, 4 insertions(+)

Patch

diff --git a/steps/obsd/pkg/add b/steps/obsd/pkg/add
index 9e6864b..c573365 100644
--- a/steps/obsd/pkg/add
+++ b/steps/obsd/pkg/add
@@ -4,4 +4,8 @@ step_taken() {
 
 take_step() {
 	pkg_add -I "$1"
+	if ! pkg_info -q -e "${1}-*"; then
+		echo 'Failed to install package'
+		return 1
+	fi
 }