Open miko-codes-a-lot opened 2 weeks ago
This'll fix that https://github.com/asdf-community/asdf-php/pull/172
The output of git ls-remote --tags https://github.com/php/php-src.git | grep 'php-'
is:
(...)
80c0a4323d487cad9cb954f0ae476ee069b6f271 refs/tags/php-8.4.0beta4^{}
73f9f842dde0f44a730eb8ea1df29e7e2961dcf9 refs/tags/php4
05309823902ed618a60123ac14d1c0d3297d84e5 refs/tags/php4^{}
The line 13 of list-all script tries to filter those lines using awk but the curly braces {}
are not escaped. So the correct version of this script should change that line:
diff --git a/bin/list-all b/bin/list-all
index 3c5c3e0..0270e12 100755
--- a/bin/list-all
+++ b/bin/list-all
@@ -10,7 +10,7 @@ sort_versions() {
versions=$(
git ls-remote --tags https://github.com/php/php-src.git |
grep 'php-' |
- awk '!/({})/ {print $2}' |
+ awk '!/\{.*\}/ {print $2}' |
sed 's/refs\/tags\/php-//' |
sort_versions |
xargs
Provide environment information
To Reproduce
Run the command after installing the plugin:
asdf list all php
Describe the Bug
Plugin php's list-all callback script failed with output: awk: line 1: regular expression compile failed (bad interval expression) ({})
Expected Behaviour
To be able to list all of PHP versions so I can start my download and installation