Route enable-internal-sources by Agent.Os at runtime and use SetupNugetSources.sh on Unix#16953
Open
Copilot wants to merge 5 commits into
Open
Route enable-internal-sources by Agent.Os at runtime and use SetupNugetSources.sh on Unix#16953Copilot wants to merge 5 commits into
Copilot wants to merge 5 commits into
Conversation
Copilot
AI
changed the title
[WIP] Fix enable-internal-sources.yml to run SetupNugetSources.ps1 only on Windows
Route enable-internal-sources by Agent.Os and align SetupNugetSources.sh credential semantics
Jun 2, 2026
mmitche
reviewed
Jun 2, 2026
mmitche
reviewed
Jun 2, 2026
mmitche
reviewed
Jun 2, 2026
mmitche
reviewed
Jun 2, 2026
Copilot
AI
changed the title
Route enable-internal-sources by Agent.Os and align SetupNugetSources.sh credential semantics
Route enable-internal-sources by Agent.Os at runtime and align SetupNugetSources.sh credential semantics
Jun 2, 2026
Copilot
AI
changed the title
Route enable-internal-sources by Agent.Os at runtime and align SetupNugetSources.sh credential semantics
Route enable-internal-sources by Agent.Os at runtime and use SetupNugetSources.sh on Unix
Jun 2, 2026
mmitche
approved these changes
Jun 2, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the enable-internal-sources.yml pipeline template to select the feed-setup implementation at task runtime based on Agent.Os, ensuring Unix agents run the Unix-native SetupNugetSources.sh instead of invoking the PowerShell script via pwsh.
Changes:
- Route internal-feed setup tasks by
Agent.Osusing taskcondition:(Windows usesPowerShell@2, non-Windows usesBash@3). - Switch Unix execution to
eng/common/SetupNugetSources.shfor both legacy credential and federated-token flows.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Comment on lines
+29
to
+31
| targetType: inline | ||
| script: | | ||
| "$(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.sh" "$(System.DefaultWorkingDirectory)/NuGet.config" "$Token" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
enable-internal-sources.ymlwas invokingSetupNugetSources.ps1on Unix viapwsh, which pulls intools.ps1and Windows-centric behavior. This change switches Unix execution toSetupNugetSources.shand updates OS routing to use runtime task conditions.Template routing by platform
eng/common/core-templates/steps/enable-internal-sources.ymlnow routes byAgent.Osat task runtime usingcondition:.PowerShell@2+SetupNugetSources.ps1Bash@3+SetupNugetSources.shAgent.Osduring template expansion.PowerShell invocation alignment
-PasswordtoSetupNugetSources.ps1(no script parameter alias changes required).Scope after review feedback
eng/common/SetupNugetSources.shcredential-update behavior.SetupNugetSources.ps1parameter alias change.To double check: