Skip to content

Commit

Permalink
Fixed checkoutTarget on non Windows. Show Verbose Checkout Error in red!
Browse files Browse the repository at this point in the history
  • Loading branch information
GeminiServer committed Jan 24, 2024
1 parent 0af87f6 commit c8e9903
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions restore/Restore-Dependencies.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ function CloneRepository($projectFilesGitInfo, $dependedProjects, $CloneDir, $Cl
$GitDir = Join-Path $CloneTarget ".git"
} else {
$CloneTarget = Join-Path -Path $CloneDir -ChildPath $dependedProject.ProjectName
$GitDir = Join-Path -Path $CloneTarget.TargetPath -ChildPath ".git"
$GitDir = Join-Path -Path $CloneTarget -ChildPath ".git"
}

if($Verbose) { Write-Host "- CloneRepository - $($checkoutTarget) - GitDir: "$GitDir -ForegroundColor Yellow }
Expand Down Expand Up @@ -423,7 +423,7 @@ function CloneRepository($projectFilesGitInfo, $dependedProjects, $CloneDir, $Cl
catch {
if($Verbose) {
$checkoutTarget = if ($CloneModeHash) { "Hash '$($dependedProject.Hash)'" } else { "Branch '$($dependedProject.Branch)'" }
Write-Host "- CloneRepository - $($dependedProject.ProjectName) - Checkout Error! Cannot checkout $($checkoutTarget) Checked out."([Char]0x2717) -ForegroundColor DarkYellow }
Write-Host "- CloneRepository - $($dependedProject.ProjectName) - Checkout Error! Cannot checkout $($checkoutTarget) Checked out."([Char]0x2717) -ForegroundColor Red }
}
}
}
Expand Down

0 comments on commit c8e9903

Please sign in to comment.