mirror of
https://github.com/ScoopInstaller/Main.git
synced 2025-11-04 15:51:23 +00:00
composer: allow options on selfupdate command (closes #2341)
Change pre/post_install to array
This commit is contained in:
parent
8d9d32cd4d
commit
f0f0427849
@ -9,18 +9,18 @@
|
||||
"COMPOSER_HOME": "$persist_dir\\home"
|
||||
},
|
||||
"env_add_path": "home\\vendor\\bin",
|
||||
"pre_install": "
|
||||
echo 'if($args -eq \"selfupdate\" -or $args -eq \"self-update\") { & scoop update composer }' | out-file \"$dir\\composer.ps1\"
|
||||
echo 'else { & php (join-path \"$psscriptroot\" \"composer.phar\") @args }' | out-file \"$dir\\composer.ps1\" -append
|
||||
",
|
||||
"post_install": "
|
||||
$och = \"$env:APPDATA\\Composer\"
|
||||
if(Test-Path $och) {
|
||||
Write-Host -F yellow \"Moving old 'COMPOSER_HOME' to '$persist_dir\\home'\"
|
||||
Move-Item -Force \"$och\\*\" \"$persist_dir\\home\"
|
||||
Remove-Item -Force \"$och\"
|
||||
}
|
||||
",
|
||||
"pre_install": [
|
||||
"echo 'if($args.length -eq 1 -and ($args -eq \"selfupdate\" -or $args -eq \"self-update\")) { & scoop update composer }' | out-file \"$dir\\composer.ps1\"",
|
||||
"echo 'else { & php (join-path $psscriptroot \"composer.phar\") @args }' | out-file \"$dir\\composer.ps1\" -append"
|
||||
],
|
||||
"post_install": [
|
||||
"$och = \"$env:APPDATA\\Composer\"",
|
||||
"if(Test-Path $och) {",
|
||||
"Write-Host -F yellow \"Moving old 'COMPOSER_HOME' to '$persist_dir\\home'\"",
|
||||
"Move-Item -Force \"$och\\*\" \"$persist_dir\\home\"",
|
||||
"Remove-Item -Force \"$och\"",
|
||||
"}"
|
||||
],
|
||||
"suggest": {
|
||||
"PHP": [
|
||||
"php",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user