Skip to content

Commit 2ec12b9

Browse files
Merged PR 13221710: explicit not use rustup
copilot messed up my script last PR, the `return` exited the script so nothing got built. instead, just going to wrap use of `rustup` to check if running in ADO. Can't run it because it won't auth and MSAzure doesn't allow public feeds, but the rust installer task already set it up as needed anyways. ---- #### AI description (iteration 1) #### PR Classification Build script update. #### PR Summary This PR modifies the build script to conditionally bypass rustup commands when the `$usingADO` flag is set, ensuring that rustup is only used in non-ADO environments. - `build.ps1`: Wraps the rustup default command in a condition checking `$usingADO`. - `build.ps1`: Adds a condition to the rustup target addition so it executes only when the architecture is not 'Current' and `$usingADO` is false. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
2 parents ea88ba4 + cad96da commit 2ec12b9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

build.ps1

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,9 @@ if ($null -ne $packageType) {
193193

194194
$BuildToolsPath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC"
195195

196-
& $rustup default stable
196+
if (!$usingADO) {
197+
& $rustup default stable
198+
}
197199

198200
## Test if Node is installed
199201
## Skipping upgrade as users may have a specific version they want to use
@@ -262,7 +264,7 @@ else {
262264
}
263265

264266
if (!$SkipBuild) {
265-
if ($architecture -ne 'Current') {
267+
if ($architecture -ne 'Current' -and !$usingADO) {
266268
& $rustup target add --toolchain $channel $architecture
267269
}
268270

0 commit comments

Comments
 (0)