Improve Write-Error messages

This commit is contained in:
Shivam Mathur
2023-03-14 06:07:46 +05:30
parent 5f422817a1
commit 6461006ceb
2 changed files with 5 additions and 5 deletions

View File

@ -17,7 +17,7 @@ Function Edit-ComposerConfig() {
php -r "try {`$p=new Phar('$tool_path.phar', 0);exit(0);} catch(Exception `$e) {exit(1);}"
if ($? -eq $False) {
Add-Log "$cross" "composer" "Could not download composer"
Write-Error "Error" -ErrorAction Stop
Write-Error "Could not download composer" -ErrorAction Stop
}
New-Item -ItemType Directory -Path $composer_bin -Force > $null 2>&1
if (-not(Test-Path $composer_json)) {