Skip to content

Commit

Permalink
Generate project.json in %TEMP% rather than in install location
Browse files Browse the repository at this point in the history
With this change we generate the project.json in %temp%\getclrdbg and
restore/publish from this directory into the final install directory. This
avoids having the project.json in the final install directory.
  • Loading branch information
chuckries committed May 18, 2016
1 parent d87a77b commit 77c55ee
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions scripts/GetClrDbg.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,14 @@ if (-not $RuntimeID) {
}
Write-Host "Info: Using Runtime ID '$RuntimeID'"

# create the install folder if it does not exist
if (-not (Test-Path -Path $InstallPath -PathType Container)) {
New-Item -ItemType Directory -Force -Path $InstallPath
# create the temp folder if it does not exist
$TempPath = Join-Path -Path $env:TEMP -ChildPath "getclrdbg"
if (-not (Test-Path -Path $TempPath -PathType Container)) {
New-Item -ItemType Directory -Force -Path $TempPath
}
$InstallPath = Resolve-Path -Path $InstallPath -ErrorAction Stop
$TempPath = Resolve-Path -Path $TempPath -ErrorAction Stop

Push-Location $InstallPath -ErrorAction Stop
Push-Location $TempPath -ErrorAction Stop

Write-Host "Info: Generating project.json"
GenerateProjectJson $VersionNumber $RuntimeID
Expand Down

0 comments on commit 77c55ee

Please sign in to comment.