Skip to content

Commit a7b6681

Browse files
authored
native tools (dotnet#13383)
* native tools * path * temp * temp * TEMP * fixit
1 parent 6bf1623 commit a7b6681

1 file changed

Lines changed: 19 additions & 4 deletions

File tree

eng/Build.ps1

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,6 @@ try {
425425

426426
[System.Environment]::SetEnvironmentVariable('DOTNET_ROLL_FORWARD_TO_PRERELEASE', '1', [System.EnvironmentVariableTarget]::User)
427427

428-
$env:NativeToolsOnMachine = $true
429428

430429
Process-Arguments
431430

@@ -438,6 +437,10 @@ try {
438437
Get-ChildItem ENV: | Sort-Object Name
439438
Write-Host ""
440439

440+
if($env:NativeToolsOnMachine) {
441+
$variable:NativeToolsOnMachine = $env:NativeToolsOnMachine
442+
}
443+
441444
if ($ci) {
442445
Prepare-TempDir
443446
EnablePreviewSdks
@@ -448,9 +451,19 @@ try {
448451
TryDownloadDotnetFrameworkSdk
449452

450453
$nativeToolsDir = InitializeNativeTools
451-
write-host "Native tools: $nativeToolsDir"
452-
$env:PERL5Path = Join-Path "$nativeToolsDir" "perl\5.32.1.1\perl\bin\perl.exe"
453-
$env:PERL5LIB = Join-Path "$nativeToolsDir" "perl\5.32.1.1\perl\vendor\lib"
454+
455+
if (-not (Test-Path variable:NativeToolsOnMachine)) {
456+
$env:PERL5Path = Join-Path "$nativeToolsDir" "perl\5.32.1.1\perl\bin\perl.exe"
457+
write-host "variable:NativeToolsOnMachine = unset or false"
458+
write-host "nativeToolsDir = $nativeToolsDir"
459+
write-host "Path = $env:PERL5Path"
460+
}
461+
else {
462+
$env:PERL5Path = "C:\arcade-tools\perl-5.32.1.1\perl\bin\perl.exe"
463+
write-host "variable:NativeToolsOnMachine = $variable:NativeToolsOnMachine"
464+
write-host "nativeToolsDir = $nativeToolsDir"
465+
write-host "Path = $env:PERL5Path"
466+
}
454467

455468
$dotnetPath = InitializeDotNetCli
456469
$env:DOTNET_ROOT = "$dotnetPath"
@@ -517,7 +530,9 @@ try {
517530
$env:FSCOREDLLPATH = "$ArtifactsDir\bin\fsc\$configuration\net472\FSharp.Core.dll"
518531
$env:LINK_EXE = "$RepoRoot\tests\fsharpqa\testenv\bin\link\link.exe"
519532
$env:OSARCH = $env:PROCESSOR_ARCHITECTURE
533+
write-host "Exec-Console $env:PERL5Path"
520534
Exec-Console $env:PERL5Path """$RepoRoot\tests\fsharpqa\testenv\bin\runall.pl"" -resultsroot ""$resultsRoot"" -results $resultsLog -log $errorLog -fail $failLog -cleanup:no -procs:$env:NUMBER_OF_PROCESSORS"
535+
write-host "Exec-Console finished"
521536
Pop-Location
522537
}
523538

0 commit comments

Comments
 (0)