mirror of
https://github.com/ScoopInstaller/Main.git
synced 2025-11-04 15:51:23 +00:00
fix php config migration / show full path
Check for old configs to migrate before creating an empty directory for the new config files Show the full path inside the notice instead of $dir/cli/conf.d
This commit is contained in:
parent
06b9ce1b84
commit
7ff63ebcee
12
php.json
12
php.json
@ -39,17 +39,17 @@
|
||||
"PHP_INI_SCAN_DIR": "$dir\\cli;$dir\\cli\\conf.d;"
|
||||
},
|
||||
"post_install": "
|
||||
# Create directory for custom PHP configuration
|
||||
if(!(Test-Path \"$dir\\cli\\conf.d\")) {
|
||||
(New-Item -Type directory \"$dir\\cli\\conf.d\") | Out-Null
|
||||
}
|
||||
|
||||
# Copy ini scan dir from old location before persistent update
|
||||
if ((Test-Path \"$dir\\..\\conf\") -and !(Test-Path \"$dir\\cli\\conf.d\")) {
|
||||
Write-Host -ForegroundColor Cyan 'We are moving your php configuration to $dir\\cli\\conf.d'
|
||||
Write-Host -ForegroundColor Cyan \"We are moving your php configuration to $dir\\cli\\conf.d\"
|
||||
Move-Item \"$dir\\..\\conf\" \"$dir\\cli\\conf.d\"
|
||||
}
|
||||
|
||||
# Create directory for custom PHP configuration
|
||||
if (!(Test-Path \"$dir\\cli\\conf.d\")) {
|
||||
(New-Item -Type directory \"$dir\\cli\\conf.d\") | Out-Null
|
||||
}
|
||||
|
||||
# Enable extensions to be found in installation-relative folder (the default is to search C:/php)
|
||||
(gc \"$dir\\cli\\php.ini\") | % { $_ -replace '; extension_dir = \"ext\"', 'extension_dir = \"ext\"' } | sc \"$dir\\cli\\php.ini\"
|
||||
",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user