Fix check in add_path

Add composer_bin to the PATH after a tool is added using composer
This commit is contained in:
Shivam Mathur
2022-02-09 00:53:56 +05:30
parent 46c34bb6a5
commit a72a638da4
3 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,6 @@ Function Edit-ComposerConfig() {
Set-Content -Path $composer_json -Value "{}"
}
Add-EnvPATH $src\configs\composer.env
Add-Path $composer_bin
if (Test-Path env:COMPOSER_TOKEN) {
Add-Env COMPOSER_AUTH ('{"github-oauth": {"github.com": "' + $env:COMPOSER_TOKEN + '"}}')
}
@ -176,6 +175,7 @@ Function Add-ComposertoolHelper() {
Remove-Item -Path $composer_lock -Force
}
composer global require $prefix$release $composer_args >$null 2>&1
Add-Path $composer_bin
return composer global show $prefix$tool 2>&1 | findstr '^versions'
} else {
$release_stream = [System.IO.MemoryStream]::New([System.Text.Encoding]::ASCII.GetBytes($release))