11-26-2021 04:36 AM - edited 11-26-2021 04:38 AM
Hi team,
Consider I want to download three packages called A,B and C.
Package A has recommends as B and C.
I have added <customExecute> in the instructions file of B to run a batch file. If the batch file throws error, error will be shown in the NIPM window and installation will not be happened.
So the error of package B affects the whole installation process.
is there a way to stop the installation of B alone and continuing the installation of other packages ?
Solved! Go to Solution.
11-27-2021 01:02 PM
Hi Priya_Gopal, NI Package Manager does not currently have a way to ignore custom execute errors. When a package is authored and includes a custom execute, there is an ignoreErrors option that the author can set to determine whether installation will error when a custom execute returns a non-zero return code. If you are the author of the package, you might be able to change the underlying option for the failing custom execute.
Do you know why the custom execute is failing? Is the failing package one that you own?
The primary feedback that we have received about ignoring custom execute errors is when a preuninstall custom execute fails and prevents a package from uninstalling. This can happen during development of a package's custom execute logic. If and when we support addressing uninstall errors, we will likely apply the capability to installation as well.
11-28-2021 10:04 PM
Thanks for the information Scott_Richardson !
I tried to use ignoreErrors in my package, but it installs the error occurring package.
To add on, the installation error is not my problem since I have coded like that in the batch file.
But that error fails the installation of upcoming packages.
What I want to do is NIPM should not install the error occurred package and install other upcoming packages. is there a possibility to do so?
11-29-2021 08:40 AM
Priya, if I am properly interpreting your situation, your package has a depends relationship on the package that errors or a depends relationship on other packages that have a depends relationship on the package that errors. If that is the case there are no options to bypass depends relationships. You could manually install the higher-level packages that are not getting installed due to the error, but that is not maintainable.
If your package has the direct dependency, you could change the relationship to recommends or remove it and rebuild your package.
If the package that errors is a File package, technically you could unpack the package, add the ignoreErrors attribute, repack the package, and then use that altered package instead. You can refer to the unpack and pack options for nipkg.exe, see Accessing the Command Line Interface for Package Manager for more information on accessing help.