mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Fix logs for symfony-cli on failure
This commit is contained in:
parent
808396c4e6
commit
293da043d1
@ -6,9 +6,13 @@ Function Add-Symfony() {
|
|||||||
$url = "https://github.com/symfony-cli/symfony-cli/releases/latest/download/symfony-cli_windows_${arch_name}.zip"
|
$url = "https://github.com/symfony-cli/symfony-cli/releases/latest/download/symfony-cli_windows_${arch_name}.zip"
|
||||||
Invoke-WebRequest -Uri $url -OutFile $bin_dir\symfony.zip >$null 2>&1
|
Invoke-WebRequest -Uri $url -OutFile $bin_dir\symfony.zip >$null 2>&1
|
||||||
Expand-Archive -Path $bin_dir\symfony.zip -DestinationPath $bin_dir -Force >$null 2>&1
|
Expand-Archive -Path $bin_dir\symfony.zip -DestinationPath $bin_dir -Force >$null 2>&1
|
||||||
Copy-Item -Path $bin_dir\symfony.exe -Destination $bin_dir\symfony-cli.exe >$null 2>&1
|
if(Test-Path $bin_dir\symfony.exe) {
|
||||||
|
Copy-Item -Path $bin_dir\symfony.exe -Destination $bin_dir\symfony-cli.exe > $null 2>&1
|
||||||
Add-ToProfile $current_profile 'symfony' "New-Alias symfony $bin_dir\symfony.exe"
|
Add-ToProfile $current_profile 'symfony' "New-Alias symfony $bin_dir\symfony.exe"
|
||||||
Add-ToProfile $current_profile 'symfony_cli' "New-Alias symfony-cli $bin_dir\symfony-cli.exe"
|
Add-ToProfile $current_profile 'symfony_cli' "New-Alias symfony-cli $bin_dir\symfony-cli.exe"
|
||||||
$tool_version = Get-ToolVersion symfony "-V"
|
$tool_version = Get-ToolVersion symfony "-V"
|
||||||
Add-Log $tick "symfony-cli" "Added symfony-cli $tool_version"
|
Add-Log $tick "symfony-cli" "Added symfony-cli $tool_version"
|
||||||
|
} else {
|
||||||
|
Add-Log $cross "symfony-cli" "Could not setup symfony-cli"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,12 @@ add_symfony() {
|
|||||||
add_brew_tap symfony-cli/homebrew-tap
|
add_brew_tap symfony-cli/homebrew-tap
|
||||||
brew install symfony-cli/tap/symfony-cli >/dev/null 2>&1
|
brew install symfony-cli/tap/symfony-cli >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
sudo ln -s "$(command -v symfony)" "${tool_path_dir:?}"/symfony-cli
|
symfony_path="$(command -v symfony)"
|
||||||
|
if [[ -n "$symfony_path" ]]; then
|
||||||
|
sudo ln -s "$symfony_path" "${tool_path_dir:?}"/symfony-cli
|
||||||
tool_version=$(get_tool_version "symfony" "-V")
|
tool_version=$(get_tool_version "symfony" "-V")
|
||||||
add_log "${tick:?}" "symfony-cli" "Added symfony-cli $tool_version"
|
add_log "${tick:?}" "symfony-cli" "Added symfony-cli $tool_version"
|
||||||
|
else
|
||||||
|
add_log "${cross:?}" "symfony-cli" "Could not setup symfony-cli"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user