File tree Expand file tree Collapse file tree 6 files changed +18
-17
lines changed
src/Microsoft.DotNet.Arcade.Sdk/tools Expand file tree Collapse file tree 6 files changed +18
-17
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ case $cpuname in
7070 ;;
7171esac
7272
73- dotnetRoot=" $repo_root / .dotnet"
73+ dotnetRoot=" ${ repo_root} .dotnet"
7474if [[ $architecture != " " ]] && [[ $architecture != $buildarch ]]; then
7575 dotnetRoot=" $dotnetRoot /$architecture "
7676fi
Original file line number Diff line number Diff line change @@ -45,11 +45,11 @@ function SetupCredProvider {
4545 # Then, we set the 'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS' environment variable to restore from the stable
4646 # feeds successfully
4747
48- $nugetConfigPath = " $RepoRoot \ NuGet.config"
48+ $nugetConfigPath = Join-Path $RepoRoot " NuGet.config"
4949
5050 if (-Not (Test-Path - Path $nugetConfigPath )) {
5151 Write-PipelineTelemetryError - Category ' Build' - Message ' NuGet.config file not found in repo root!'
52- ExitWithExitCode 1
52+ ExitWithExitCode 1
5353 }
5454
5555 $endpoints = New-Object System.Collections.ArrayList
@@ -85,7 +85,7 @@ function SetupCredProvider {
8585
8686# Workaround for https://github.com/microsoft/msbuild/issues/4430
8787function InstallDotNetSdkAndRestoreArcade {
88- $dotnetTempDir = " $RepoRoot \ dotnet"
88+ $dotnetTempDir = Join-Path $RepoRoot " dotnet"
8989 $dotnetSdkVersion = " 2.1.507" # After experimentation we know this version works when restoring the SDK (compared to 3.0.*)
9090 $dotnet = " $dotnetTempDir \dotnet.exe"
9191 $restoreProjPath = " $PSScriptRoot \restore.proj"
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ function SetupCredProvider {
3939 # Then, we set the 'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS' environment variable to restore from the stable
4040 # feeds successfully
4141
42- local nugetConfigPath=" $repo_root / NuGet.config"
42+ local nugetConfigPath=" { $repo_root } NuGet.config"
4343
4444 if [ ! " $nugetConfigPath " ]; then
4545 Write-PipelineTelemetryError -category ' Build' " NuGet.config file not found in repo's root!"
Original file line number Diff line number Diff line change @@ -702,7 +702,10 @@ function MSBuild-Core() {
702702 }
703703
704704 foreach ($arg in $args ) {
705- if ($arg -ne $null -and $arg.Trim () -ne " " ) {
705+ if ($null -ne $arg -and $arg.Trim () -ne " " ) {
706+ if ($arg.EndsWith (' \' )) {
707+ $arg = $arg + " \"
708+ }
706709 $cmdArgs += " `" $arg `" "
707710 }
708711 }
@@ -774,7 +777,7 @@ function Get-Darc($version) {
774777
775778. $PSScriptRoot \pipeline- logging- functions.ps1
776779
777- $RepoRoot = Resolve-Path (Join-Path $PSScriptRoot ' ..\..' )
780+ $RepoRoot = Resolve-Path (Join-Path $PSScriptRoot ' ..\..\ ' )
778781$EngRoot = Resolve-Path (Join-Path $PSScriptRoot ' ..' )
779782$ArtifactsDir = Join-Path $RepoRoot ' artifacts'
780783$ToolsetDir = Join-Path $ArtifactsDir ' toolset'
Original file line number Diff line number Diff line change @@ -485,13 +485,14 @@ _script_dir=`dirname "$_ResolvePath"`
485485
486486eng_root=` cd -P " $_script_dir /.." && pwd`
487487repo_root=` cd -P " $_script_dir /../.." && pwd`
488- artifacts_dir=" $repo_root /artifacts"
488+ repo_root=" ${repo_root} /"
489+ artifacts_dir=" ${repo_root} artifacts"
489490toolset_dir=" $artifacts_dir /toolset"
490- tools_dir=" $repo_root / .tools"
491+ tools_dir=" ${ repo_root} .tools"
491492log_dir=" $artifacts_dir /log/$configuration "
492493temp_dir=" $artifacts_dir /tmp/$configuration "
493494
494- global_json_file=" $repo_root / global.json"
495+ global_json_file=" ${ repo_root} global.json"
495496# determine if global.json contains a "runtimes" entry
496497global_json_has_runtimes=false
497498if command -v jq & > /dev/null; then
504505
505506# HOME may not be defined in some scenarios, but it is required by NuGet
506507if [[ -z $HOME ]]; then
507- export HOME=" $repo_root / artifacts/.home/"
508+ export HOME=" ${ repo_root} artifacts/.home/"
508509 mkdir -p " $HOME "
509510fi
510511
Original file line number Diff line number Diff line change 11<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. -->
2- <Project DefaultTargets =" Execute" TreatAsLocalProperty = " RepoRoot " >
2+ <Project DefaultTargets =" Execute" >
33 <!--
44
55 Required parameters:
3333 -->
3434
3535 <PropertyGroup >
36- <_RepoRootOriginal >$(RepoRoot)</_RepoRootOriginal >
37- <RepoRoot >$([System.IO.Path]::GetFullPath('$(RepoRoot)/'))</RepoRoot >
38-
3936 <_OriginalProjectsValue >$(Projects)</_OriginalProjectsValue >
4037 </PropertyGroup >
4138
8077
8178 <Target Name =" Execute" >
8279 <Error Text =" No projects were found to build. Either the 'Projects' property or 'ProjectToBuild' item group must be specified." Condition =" '@(ProjectToBuild)' == ''" />
83- <Error Text =" Property 'RepoRoot' must be specified" Condition =" '$(_RepoRootOriginal )' == ''" />
84- <Error Text =" File 'global.json' must exist in directory specified by RepoRoot: '$(_RepoRootOriginal )'" Condition =" '$(_RepoRootOriginal )' != '' and !Exists('$(RepoRoot)global.json')" />
80+ <Error Text =" Property 'RepoRoot' must be specified" Condition =" '$(RepoRoot )' == ''" />
81+ <Error Text =" File 'global.json' must exist in directory specified by RepoRoot: '$(RepoRoot )'" Condition =" '$(RepoRoot )' != '' and !Exists('$(RepoRoot)global.json')" />
8582
8683 <PropertyGroup >
8784 <!-- 'IsRunningFromVisualStudio' may be true even when running msbuild.exe from command line. This generally means that MSBuild is from a Visual Studio installation and therefore we need to find NuGet.targets in a different location. -->
You can’t perform that action at this time.
0 commit comments