NI Package Manager (NIPM)

cancel
Showing results for 
Search instead for 
Did you mean: 

Stop installation of one package and continue other package installation

Solved!
Go to solution

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 ?

0 Kudos
Message 1 of 4
(1,937 Views)

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.

 

 

 

Scott Richardson
https://testeract.com
0 Kudos
Message 2 of 4
(1,906 Views)

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?

 

 

0 Kudos
Message 3 of 4
(1,897 Views)
Solution
Accepted by topic author Priya_Gopal

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.

Scott Richardson
https://testeract.com
0 Kudos
Message 4 of 4
(1,880 Views)