diff --git a/eng/common/dotnet-install.sh b/eng/common/dotnet-install.sh index fdfeea66e7d..d6efeb44340 100755 --- a/eng/common/dotnet-install.sh +++ b/eng/common/dotnet-install.sh @@ -70,7 +70,7 @@ case $cpuname in ;; esac -dotnetRoot="${repo_root}.dotnet" +dotnetRoot="$repo_root/.dotnet" if [[ $architecture != "" ]] && [[ $architecture != $buildarch ]]; then dotnetRoot="$dotnetRoot/$architecture" fi diff --git a/eng/common/internal-feed-operations.ps1 b/eng/common/internal-feed-operations.ps1 index 92b77347d99..418c09930cf 100644 --- a/eng/common/internal-feed-operations.ps1 +++ b/eng/common/internal-feed-operations.ps1 @@ -45,11 +45,11 @@ function SetupCredProvider { # Then, we set the 'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS' environment variable to restore from the stable # feeds successfully - $nugetConfigPath = Join-Path $RepoRoot "NuGet.config" + $nugetConfigPath = "$RepoRoot\NuGet.config" if (-Not (Test-Path -Path $nugetConfigPath)) { Write-PipelineTelemetryError -Category 'Build' -Message 'NuGet.config file not found in repo root!' - ExitWithExitCode 1 + ExitWithExitCode 1 } $endpoints = New-Object System.Collections.ArrayList @@ -85,7 +85,7 @@ function SetupCredProvider { #Workaround for https://github.com/microsoft/msbuild/issues/4430 function InstallDotNetSdkAndRestoreArcade { - $dotnetTempDir = Join-Path $RepoRoot "dotnet" + $dotnetTempDir = "$RepoRoot\dotnet" $dotnetSdkVersion="2.1.507" # After experimentation we know this version works when restoring the SDK (compared to 3.0.*) $dotnet = "$dotnetTempDir\dotnet.exe" $restoreProjPath = "$PSScriptRoot\restore.proj" diff --git a/eng/common/internal-feed-operations.sh b/eng/common/internal-feed-operations.sh index 9378223ba09..e2233e78122 100755 --- a/eng/common/internal-feed-operations.sh +++ b/eng/common/internal-feed-operations.sh @@ -39,7 +39,7 @@ function SetupCredProvider { # Then, we set the 'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS' environment variable to restore from the stable # feeds successfully - local nugetConfigPath="{$repo_root}NuGet.config" + local nugetConfigPath="$repo_root/NuGet.config" if [ ! "$nugetConfigPath" ]; then Write-PipelineTelemetryError -category 'Build' "NuGet.config file not found in repo's root!" diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 06871599323..bc4eabe5211 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -702,10 +702,7 @@ function MSBuild-Core() { } foreach ($arg in $args) { - if ($null -ne $arg -and $arg.Trim() -ne "") { - if ($arg.EndsWith('\')) { - $arg = $arg + "\" - } + if ($arg -ne $null -and $arg.Trim() -ne "") { $cmdArgs += " `"$arg`"" } } @@ -777,7 +774,7 @@ function Get-Darc($version) { . $PSScriptRoot\pipeline-logging-functions.ps1 -$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot '..\..\') +$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot '..\..') $EngRoot = Resolve-Path (Join-Path $PSScriptRoot '..') $ArtifactsDir = Join-Path $RepoRoot 'artifacts' $ToolsetDir = Join-Path $ArtifactsDir 'toolset' diff --git a/eng/common/tools.sh b/eng/common/tools.sh index 05ca99c6b28..5fad1846e5a 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -485,14 +485,13 @@ _script_dir=`dirname "$_ResolvePath"` eng_root=`cd -P "$_script_dir/.." && pwd` repo_root=`cd -P "$_script_dir/../.." && pwd` -repo_root="${repo_root}/" -artifacts_dir="${repo_root}artifacts" +artifacts_dir="$repo_root/artifacts" toolset_dir="$artifacts_dir/toolset" -tools_dir="${repo_root}.tools" +tools_dir="$repo_root/.tools" log_dir="$artifacts_dir/log/$configuration" temp_dir="$artifacts_dir/tmp/$configuration" -global_json_file="${repo_root}global.json" +global_json_file="$repo_root/global.json" # determine if global.json contains a "runtimes" entry global_json_has_runtimes=false if command -v jq &> /dev/null; then @@ -505,7 +504,7 @@ fi # HOME may not be defined in some scenarios, but it is required by NuGet if [[ -z $HOME ]]; then - export HOME="${repo_root}artifacts/.home/" + export HOME="$repo_root/artifacts/.home/" mkdir -p "$HOME" fi diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/Build.proj b/src/Microsoft.DotNet.Arcade.Sdk/tools/Build.proj index 8c8fa7ef037..5d67c1c7f62 100644 --- a/src/Microsoft.DotNet.Arcade.Sdk/tools/Build.proj +++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/Build.proj @@ -1,5 +1,5 @@ - + + <_RepoRootOriginal>$(RepoRoot) + $([System.IO.Path]::GetFullPath('$(RepoRoot)/')) + <_OriginalProjectsValue>$(Projects) @@ -77,8 +80,8 @@ - - + +