fix composer.ps1 path

This commit is contained in:
crazywhalecc 2023-12-23 00:28:32 +08:00
parent 2f786b77bd
commit 5336a02bd2

View File

@ -90,7 +90,11 @@ 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
$ComposerContent = '
$WorkingDir = (Split-Path -Parent $MyInvocation.MyCommand.Definition)
Start-Process ($WorkingDir + "\php.exe") ($WorkingDir + "\composer.phar " + $args) -NoNewWindow -Wait
'
$ComposerContent | Set-Content -Path 'runtime\composer.ps1' -Encoding UTF8
Write-Host "Successfully downloaded PHP and Composer !" -ForegroundColor Green
Write-Host "Use static-php-cli: " -NoNewline