The parser has a problem with values starting with "-" (see: symfony/symfony#27333)
Download the latest joomla release and start a script driven installtion:
wget -O joomla.zip https://downloads.joomla.org/cms/joomla5/5-0-2/Joomla_5-0-2-Stable-Full_Package.zip?format=zip
unzip joomla.zip
python3 -c "import subprocess; subprocess.run(['php', 'installation/joomla.php', 'install', '--admin-password', '-uhoh'])"
No error regarding the value of "--admin-password" is thrown. (I know that I have omitted passing all required options to keep the example short)
An error is thrown
$ python3 -c "import subprocess; subprocess.run(['php', 'installation/joomla.php', 'install', '--admin-password', '-uhoh'])"
The "--admin-password" option requires a value.
install [--site-name SITE-NAME] [--admin-user ADMIN-USER] [--admin-username ADMIN-USERNAME] [--admin-password ADMIN-PASSWORD] [--admin-email ADMIN-EMAIL] [--db-type DB-TYPE] [--db-host DB-HOST] [--db-user DB-USER] [--db-pass [DB-PASS]] [--db-name DB-NAME] [--db-prefix DB-PREFIX] [--db-encryption DB-ENCRYPTION] [--db-sslkey [DB-SSLKEY]] [--db-sslcert [DB-SSLCERT]] [--db-sslverifyservercert [DB-SSLVERIFYSERVERCERT]] [--db-sslca [DB-SSLCA]] [--db-sslcipher [DB-SSLCIPHER]] [--public-folder [PUBLIC-FOLDER]] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [--] <command>
Maybe the installer should allow reading config values from the system environment instead of relying on the option parser
Labels |
Added:
No Code Attached Yet
|
Title |
|
Labels |
Added:
bug
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-03-29 20:28:55 |
Closed_By | ⇒ | Hackwar |
Yes, writing
--admin-password -uhoh
will fail, however I would say that is normal behavior on the CLI. The solution here is to use--admin-password="-uhoh"
to escape that properly. Since this is not a bug, I'm closing this one.