Skip to content

Fix #137: Add SuccessExitCode to ManifestInstaller#296

Closed
chausner wants to merge 1 commit into
microsoft:masterfrom
chausner:success-exit-code
Closed

Fix #137: Add SuccessExitCode to ManifestInstaller#296
chausner wants to merge 1 commit into
microsoft:masterfrom
chausner:success-exit-code

Conversation

@chausner

@chausner chausner commented May 22, 2020

Copy link
Copy Markdown
Contributor

This PR suggests a fix for #137 by adding an optional SuccessExitCode attribute to the Installers entries in the manifest. If present, it overrides the default value of zero.

For now, this only allows a single value to be defined as success status code. I am not sure if there are cases where we would want multiple exit codes to count as success.

Right now, SuccessExitCode is not printed by the "show" command but we could add it if desired.

Microsoft Reviewers: Open in CodeFlow

@chausner chausner requested a review from a team as a code owner May 22, 2020 16:19
@JohnMcPMS

Copy link
Copy Markdown
Member

We have a manifest versioning strategy that isn't really mature in the codebase yet, but we want to ensure we build that muscle/work out the kinks. So any new additions to the manifest would need increment the manifest version and be interpreted appropriately.

In addition, I think we probably do want to support multiple exit codes for success. While the uses are probably low, it would be better to support it from the beginning than to have a versioning problem later on. But this kind of thing is best worked out in a spec (which I think we need to document the process better). See https://github.com/microsoft/winget-cli/projects/1

@chausner

Copy link
Copy Markdown
Contributor Author

Thank you for your feedback. I'd be happy to make changes once the spec is finalized and the details have been clarified.

@benferse

Copy link
Copy Markdown
Member

@JohnMcPMS The canonical example that comes to mind are the "pseudo-success" codes that are returned for installs that require a reboot to complete:

  • ERROR_SUCCESS_REBOOT_REQUIRED
  • ERROR_SUCCESS_REBOOT_INITIATED
  • ERROR_INSTALL_SUSPEND

@yao-msft

yao-msft commented Mar 9, 2021

Copy link
Copy Markdown
Contributor

Thanks for the contribution. This pr is included as part of #778

@yao-msft yao-msft closed this Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants