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

opt(Invoke-ExternalCommand): Small tweak #3547

Merged
merged 2 commits into from
Jul 16, 2019

Conversation

niheaven
Copy link
Member

@niheaven niheaven commented Jul 4, 2019

  • Also redirect standard error to log file.
  • Fix -RunAs error.
    • -RunAs and -Log cannot be used together.

@r15ch13
Copy link
Member

r15ch13 commented Jul 16, 2019

Why did you add ParameterSetName if you don't use the feature? 😄
https://blog.simonw.se/powershell-functions-and-parameter-sets/

@niheaven
Copy link
Member Author

-RunAs and -Log cannot be used together.

Verb = RunAs needs UseShellExcute = $true while RedirectStandardOutput needs UseShellExcute = $false, so I add ParameterSetName to give an error.

@r15ch13
Copy link
Member

r15ch13 commented Jul 16, 2019

Oh, I understand it now. Sorry 😅

@r15ch13 r15ch13 merged commit f33799d into ScoopInstaller:develop Jul 16, 2019
@niheaven niheaven deleted the fix-run branch July 17, 2019 15:55
Ash258 pushed a commit to Ash258/Scoop-Core that referenced this pull request Aug 31, 2019
…aller#3547)

- Redirect standard error to log file.
- Fix `-RunAs` error.
  - `-RunAs` and `-Log` cannot be used together.
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