Skip to content
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

feat(core): Add -Quiet switch for Invoke-ExternalCommand #5346

Merged
merged 1 commit into from
Mar 11, 2023

Conversation

lewis-yeung
Copy link
Contributor

@lewis-yeung lewis-yeung commented Jan 17, 2023

Description

In function Invoke-ExternalCommand, the $Process.StartInfo.CreateNoWindow was forcibly set to $true by mistake in #5066, which may cause problems in some cases. In this PR, a -Silent -Quiet switch was introduced. The switch controls whether an app should run silently, that means, without any output for a console app or without a window for a GUI app.

Checklist:

  • I have read the Contributing Guide.
  • I have ensured that I am targeting the develop branch.
  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.
  • I have added an entry in the CHANGELOG.

lib/core.ps1 Show resolved Hide resolved
lib/core.ps1 Show resolved Hide resolved
@niheaven
Copy link
Member

niheaven commented Mar 10, 2023

Ed. LGTM except for the param name.

Hmm, renaming to $Quiet? Ref: https://learn.microsoft.com/en-us/powershell/scripting/developer/cmdlet/activity-parameters?view=powershell-7.3

Quiet
Data type: SwitchParameter
Implement this parameter so that the cmdlet suppresses user feedback during its actions when the parameter is specified.

@lewis-yeung
Copy link
Contributor Author

@niheaven Fair point. Will do.

@lewis-yeung
Copy link
Contributor Author

@niheaven Fair point. Will do.

Done.

@niheaven niheaven merged commit 41620bb into ScoopInstaller:develop Mar 11, 2023
@lewis-yeung lewis-yeung changed the title feat(core): Add -Silent switch for Invoke-ExternalCommand feat(core): Add -Quiet switch for Invoke-ExternalCommand Mar 11, 2023
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.

2 participants