StopOnPackageFailure not working #464
Labels
Bug
Issues where something has happened which was not expected or intended
Duplicate Issue
Issues that are duplicates of other issues
What You Are Seeing?
using this demo file:
When running the command:
It fail to install
non_existing_package
but it continue with installing 7zipWhat Is Expected?
Boxstarter should stop after failing to install non_existing_package
Output Log
Full Log Output
=====
Boxstarter: Installing package dev.ps1
Boxstarter Version 2.13.0
(c) 2018 Chocolatey Software, Inc, 2012 - 2018 Matt Wrock. https://boxstarter.org
Please type CTRL+C or close this window to exit Boxstarter if you do not want to risk a reboot during this Boxstarter install.
Boxstarter may need to reboot your system.
Please provide your password so that Boxstarter may automatically log you on.
Your password will be securely stored and encrypted.
Autologon Password: ********
Boxstarter: Successfully authenticated password.
NoPassword is set to False and RebootOk is set to True and the NoPassword parameter passed was False and StopOnPackageFailure is set to True
Boxstarter: Disabling Automatic Updates from Windows Update
Attempting to build package from 'tmp491A.tmp.nuspec'.
Successfully created package 'C:\ProgramData\Boxstarter\BuildPackages\tmp491A.tmp.1.0.0.nupkg'
Boxstarter: Created a temporary package tmp491A.tmp from dev.ps1 in C:\ProgramData\Boxstarter\BuildPackages
++ Boxstarter starting Calling Chocolatey to install tmp491A.tmp. This may take several minutes to complete...
Installing the following packages:
tmp491A.tmp
By installing you accept licenses for the packages.
[NuGet] Installing 'tmp491A.tmp 1.0.0'.
[NuGet] Successfully installed 'tmp491A.tmp 1.0.0'.
tmp491A.tmp v1.0.0 (forced)
tmp491a.tmp package files install completed. Performing other installation steps.
Installing the following packages:
non_existing_package
By installing you accept licenses for the packages.
non_existing_package not installed. The package was not found with the source(s) listed.
If you specified a particular version and are receiving this message, it is possible that the package name exists but the version does not.
Version: ""
Source(s): "C:\ProgramData\Boxstarter\BuildPackages;https://chocolatey.org/api/v2"
Chocolatey installed 0/1 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Failures
If you specified a particular version and are receiving this message, it is possible that the package name exists but the version does not.
Version: ""
Source(s): "C:\ProgramData\Boxstarter\BuildPackages;https://chocolatey.org/api/v2"
Chocolatey reported an unsuccessful exit code of 1. See C:\Users\walid\AppData\Local\Boxstarter\boxstarter.log for details.
Boxstarter: Error from Chocolatey:
Message : Chocolatey reported an unsuccessful exit code of 1. See C:\Users\walid\AppData\Local\Boxstarter\boxstarter.log for details.
Data : {}
InnerException :
TargetSite :
StackTrace :
HelpLink :
Source :
HResult : -2146233087
Boxstarter: Error from Chocolatey:
Message : Chocolatey reported an unsuccessful exit code of 1. See C:\Users\walid\AppData\Local\Boxstarter\boxstarter.log for details.
Data : {}
InnerException :
TargetSite :
StackTrace :
HelpLink :
Source :
HResult : -2146233087
Installing the following packages:
7zip
By installing you accept licenses for the packages.
7zip v19.0 already installed.
Use --force to reinstall, specify a version to install, or try upgrade.
Chocolatey installed 0/1 packages. 0 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Warnings:
Use --force to reinstall, specify a version to install, or try upgrade.
Only an exit code of non-zero will fail the package by default. Set
--failonstderr
if you want error messages to also fail a script. Seechoco -h
for details.The install of tmp491a.tmp was successful.
Software install location not explicitly set, could be in package or
default install location if installer.
Chocolatey installed 1/1 packages. 0 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
++ Boxstarter finished Calling Chocolatey to install tmp491A.tmp. This may take several minutes to complete... 00:00:08.6981152
True
Boxstarter: Restore Automatic Updates from Windows Update
The text was updated successfully, but these errors were encountered: