-
Notifications
You must be signed in to change notification settings - Fork 905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
{WIP}(GH-598) add outputdirectory for choco pack #609
{WIP}(GH-598) add outputdirectory for choco pack #609
Conversation
@@ -186,6 +186,7 @@ private void append_output(StringBuilder propertyValues, string append) | |||
public string Version { get; set; } | |||
public bool AllVersions { get; set; } | |||
public bool SkipPackageInstallProvider { get; set; } | |||
public string OutputDirectory { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
When interacting with a PowerShell host, ensure it returns the proper exit code by calling the right method that will set it for both system powershell and the internal host.
When attempting to act on a downloaded file, it may be a text file and not a binary. When that is determined, throw an error instead.
When running PowerShell and certain things are found, exit appropriately. - When a file is not found, exit 2. - When a file found is not right, exit 4. - When a file can not be downloaded, exit 404. - When unzipping has issues, exit with its result exit code
When running native installers, allow choco to exit with the same exit code as the installer. Additionally, detect valid exit codes and do not error when receiving those exit codes. Pass the exit code to the package so that result can be passed back.
This is more reflective of what the function does.
* stable: (maint) rename Get-FileName to Get-WebFileName (maint) Log host version as well. (GH-512) Exit with same code as installer (GH-707) Exit with specific exit codes (GH-649) Error if executable is text file (GH-709) Get Exit code from PowerShell Host (GH-512) Display exit code for packages (GH-710) prompt with timeout on some commands (maint) better error handling
Package exit codes provide the ability for the exit code of an underlying installer to be passed through to Chocolatey's exit code. This value is the last non-zero exit code from a package or dependency that Chocolatey is currently installing. This change, while very enabling, may be surprising for some folks and they may wish to shut this feature off. As this feature may need to be shut off, provide it as both a feature and switches to turn it on/off per install, upgrade, and uninstall. Add the switches to tab expansion as well.
* stable: (GH-512) Allow configuring package exit codes
Add installer types for - BitRock Installer - QT Installer - Squirrel
When loading extensions, make sure the user also knows they are being loaded by reporting them in log info.
When installs exit in a way that indicates a reboot is necessary, indicate so in the summary log. Include the package name and exit code.
Once every ten runs or so, randomly mention the professional and business versions. This will help bring awareness for users that won't be aware in any other way. When a user is using install directory override through the install arguments, provide awareness that there is a feature that will save them the trouble of spending extra time determining the install directory themselves.
* stable: (maint) formatting (maint) Provide awareness of pro / business
Certain package commands will honor the install directory override, but others will not. If those are used, Chocolatey should warn that the directory override will not work.
* stable: (GH-258) Warn when directory overrides won't be honored
Would you look at that? I mean, just look at it!
* stable: (maint) Look at that new logo! (doc) update readme with support / newsletter (doc) update changelog/nuspec
* stable: (doc) see logo in readme/changelog
There are cases when the process has signalled it has exited, but it hasn't actually returned an exit code yet. Hold for 2 seconds to allow the process to fully exit before attempting to capture the exit code.
When a pending file is created, it needs to be at least 10 seconds old before choco will automatically remove the unfinished pacakge. This allows running choco functions inside of a package (as long as they are done quickly). If someone needs to override the functionality of the removal of a package due to the pending file, choco will also look for a .chocolateyPendingSkip and skip the removal if that file is found.
After downloading or FTPing a file, sleep for a second. When finishing running processes, do the same.
If a valid exit code specified is not recognized as one of choco's valid exit codes, provide a warning and set the exit code to 0.
Some packages have passed silent arguments as an array. Allow specifying it as a string array and then join the arguments together.
Using `Path.GetTempPath()` instead of `Environment.GetEnvironmentVariable("TEMP")` in 76ae7e2 for GH-532 has caused the SYSTEM user to return one of the following: * `c:\windows\system32\config\systemprofile\appdata\local\temp` * `c:\windows\syswow64\config\systemprofile\appdata\local\temp` These folders seem to cause issues with accessing files, causing all kinds of fun issues, such as "Not able to read package from path" and not able to find executables being downloaded to these folders. If one of these two folders is detected, ensure that the folder structure is `%SystemRoot%\TEMP`.
* stable: (GH-826) SYSTEM user always uses machine TEMP (GH-808) Allow silent args as array (GH-821) ValidExitCodes not recognized return 0 (GH-818) Allow disk to catch up - sleep (GH-822) Provide pending override and file wait (GH-818) Wait for processes to exit + 2 seconds (maint) formatting (GH-819) Fix - NotSilent install failure binding (GH-775) remove 7za (GH-775) Use 7z instead of 7za
If it is a valid exit code, choco used to set the exit code to zero. Otherwise the exit code was set to 1. That behavior needs to continue to be that way for the exit code of choco.exe when ignoring package exit codes.
* stable: (GH-827) No really, ignore package exit codes
To maintain compatibility with licensed versions for now, allow RemovePendingPackagesTask to continue to use the previous constructor as well as the new one.
* stable: (maint) match casing for directory override args (version) 0.9.10.3 (GH-808) type is string, not statements update CHANGELOG/nuspec (maint) RemovePendingPackagesTask 2 constructors
…H-598)-add-output-directory-for-choco-pack
Add a new option outputdirectory for PackCommand and the corresponding OutputDirectory property in ChocolateyConfiguration. Pack run can't be tested because PackageBuilder isn't mocked and not used mocked filesystem.
…r-choco-pack' into (GH-598)-add-output-directory-for-choco-pack
I have added the integration tests and done a rebase since the branch was behind. |
Please don't merge, always fetch and rebase. Right now this is not in a state that it can even be reviewed. You can try to back out the merge and just provide the commits for the changes or you can close and reopen this with just the changes. |
Sorry about that, I'll try to fix it this week. |
I am sorry, this one is irrecoverable, I had to create a new PR #891. |
Fix #598
Add a new option outputdirectory for PackCommand and the corresponding
OutputDirectory property in ChocolateyConfiguration.
Pack run can't be tested because PackageBuilder isn't mocked and not
use mocked filesystem.
Should I add an indirection for PackageBuilder through an IPackageBuilderFactory which can be passed to NugetService constructor?