Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Now that atomicity is clean we can fail on pre install script fail
Baptiste Daroussin committed 10 years ago
commit 3fec0d613e54c6db508cd05d34218121ef669b91
parent a3e90c4
1 file changed +3 -1
modified libpkg/pkg_add.c
@@ -854,7 +854,9 @@ pkg_add_common(struct pkgdb *db, const char *path, unsigned flags,
	 * Execute pre-install scripts
	 */
	if ((flags & (PKG_ADD_NOSCRIPT | PKG_ADD_USE_UPGRADE_SCRIPTS)) == 0)
-
		pkg_script_run(pkg, PKG_SCRIPT_PRE_INSTALL);
+
		if ((retcode = pkg_script_run(pkg, PKG_SCRIPT_PRE_INSTALL)) != EPKG_OK)
+
			goto cleanup;
+


	/* add the user and group if necessary */