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

Explicitly use dotnet pwsh in scripts #72341

Closed
wants to merge 8 commits into from
Closed

Conversation

jaredpar
Copy link
Member

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.

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.
@jaredpar jaredpar requested a review from a team as a code owner February 29, 2024 16:19
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Infrastructure untriaged Issues and PRs which have not yet been triaged by a lead labels Feb 29, 2024
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
Copy link
Member

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 {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: remove blank line?

Suggested change

@jaredpar
Copy link
Member Author

jaredpar commented Mar 7, 2024

closing in favor of #72423

@jaredpar jaredpar closed this Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Infrastructure untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants