mediawiki: Ensure password file is not empty

The temporary file is sometimes not flushed to disk by the time the PHP
command is called. This makes the password file empty and breaks the
installation.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
This commit is contained in:
Joseph Nuthalapati 2020-09-30 20:43:35 +05:30 committed by Sunil Mohan Adapa
parent 28aa5ec756
commit 04617cbf7f
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2

View File

@ -86,6 +86,7 @@ def subcommand_setup(_):
password = generate_password()
with tempfile.NamedTemporaryFile() as password_file_handle:
password_file_handle.write(password.encode())
password_file_handle.flush()
subprocess.check_call([
_get_php_command(), install_script,
'--confpath=/etc/mediawiki', '--dbtype=sqlite',