mirror of
https://github.com/shivammathur/setup-php.git
synced 2025-11-12 20:23:00 +07:00
Add support to use existing COMPOSER_PROCESS_TIMEOUT
This commit is contained in:
@ -23,7 +23,7 @@ Function Edit-ComposerConfig() {
|
||||
if (-not(Test-Path $composer_json)) {
|
||||
Set-Content -Path $composer_json -Value "{}"
|
||||
}
|
||||
Add-EnvPATH $src\configs\composer.env
|
||||
Set-ComposerEnv
|
||||
Add-Path $composer_bin
|
||||
Set-ComposerAuth
|
||||
}
|
||||
@ -52,6 +52,14 @@ Function Set-ComposerAuth() {
|
||||
}
|
||||
}
|
||||
|
||||
# Function to set composer environment variables.
|
||||
Function Set-ComposerEnv() {
|
||||
if ($env:COMPOSER_PROCESS_TIMEOUT) {
|
||||
(Get-Content $src\configs\composer.env -Raw) -replace '(?m)^COMPOSER_PROCESS_TIMEOUT=.*$', "COMPOSER_PROCESS_TIMEOUT=$env:COMPOSER_PROCESS_TIMEOUT" | Set-Content $src\configs\composer.env
|
||||
}
|
||||
Add-EnvPATH $src\configs\composer.env
|
||||
}
|
||||
|
||||
# Function to extract tool version.
|
||||
Function Get-ToolVersion() {
|
||||
Param (
|
||||
|
||||
Reference in New Issue
Block a user