mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 13:24:51 +08:00
add cool console output
This commit is contained in:
parent
0810071ed4
commit
84059abb9a
@ -40,4 +40,9 @@ if (-not(Test-Path "runtime\composer.phar"))
|
||||
# create runtime\composer.ps1
|
||||
Set-Content -Path 'runtime\composer.ps1' -Value 'Start-Process "runtime\php.exe" ("runtime\composer.phar " + $args) -NoNewWindow -Wait' -Encoding UTF8
|
||||
|
||||
Write-Host "Successfully downloaded PHP and Composer !"
|
||||
Write-Host "Successfully downloaded PHP and Composer !" -ForegroundColor Green
|
||||
Write-Host "Use static-php-cli: bin/spc" -ForegroundColor Green
|
||||
Write-Host "Use php: runtime/php" -ForegroundColor Green
|
||||
Write-Host "Use composer: runtime/composer" -ForegroundColor Green
|
||||
Write-Host ""
|
||||
Write-Host "Don't forget installing composer dependencies ('runtime/composer install') before using static-php-cli !" -ForegroundColor Cyan
|
||||
@ -3,7 +3,7 @@ $PHP_Exec = "runtime\php.exe"
|
||||
if (-not(Test-Path $PHP_Exec)) {
|
||||
$PHP_Exec = Get-Command php.exe -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Definition
|
||||
if (-not $PHP_Exec) {
|
||||
Write-Host "Error: PHP not found." -ForegroundColor Red
|
||||
Write-Host "Error: PHP not found, you need to install PHP on your system or use 'bin/setup-runtime'." -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user