Remove Set-Location and Push-Location usage from PowerShell scripts #3385
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Set-LocationandPush-Locationin engineering scripts change the caller's working directory, which is not idiomatic for Rust tooling. These scripts should use path arguments instead.Changes
eng/scripts/
Update-TspClients.ps1: Use--output-dirparameter fortsp-clientPack-Crates.ps1: Use--manifest-pathforcargo publishLanguage-Settings.ps1: Use--manifest-pathforcargo metadataTest-Packages.ps1: Use--manifest-pathforcargo buildandcargo testsdk/
identity/test-resources-post.ps1: Use full paths with[System.IO.Path]::Combine()core/azure_core_amqp/Test-Setup.ps1: Use full paths for git clone, dotnet build, and dotnet execExample
Before:
After:
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
0t3vsblobprodcus362.vsblob.vsassets.io/usr/bin/dotnet dotnet build --framework net8.0(dns block)4myvsblobprodcus32.vsblob.vsassets.io/usr/bin/dotnet dotnet build --framework net8.0(dns block)gbsvsblobprodcus365.vsblob.vsassets.io/usr/bin/dotnet dotnet build --framework net8.0(dns block)kgfvsblobprodcus314.vsblob.vsassets.io/usr/bin/dotnet dotnet build --framework net8.0(dns block)pe3vsblobprodcus354.vsblob.vsassets.io/usr/bin/dotnet dotnet build --framework net8.0(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.