-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Explicitly use dotnet pwsh in scripts #72341
Conversation
This changes our cmd/ps1 scripts to explicitly use `dotnet pwsh` instead of `pwsh`. The former is guaranteed to be in our enlistment as it's installed as a local tool. The latter, while present on most machines including CI, is not guaranteed to be on all developer machines.
Co-authored-by: Joey Robichaud <joseph.robichaud@microsoft.com>
function Stop-Processes() { | ||
Write-Host 'Killing running build processes Roslyn style...' | ||
foreach ($processName in $processesToStopOnExit) { | ||
Get-Process -Name $processName -ErrorAction SilentlyContinue ? { $_.ProcessId -ne $PID } | Stop-Process |
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.
Had to look up what ?
meant in powershell. For others who don't know, ?
is an alias for Where-Object
. Meaning it works as a filter here to exclude the running process.
$ErrorActionPreference="Stop" | ||
|
||
try { | ||
|
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.
Nit: remove blank line?
closing in favor of #72423 |
This changes our cmd/ps1 scripts to explicitly use
dotnet pwsh
instead ofpwsh
. The former is guaranteed to be in our enlistment as it's installed as a local tool. The latter, while present on most machines including CI, is not guaranteed to be on all developer machines.