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 authored and Sunil Mohan Adapa committed 2020-10-31 22:04:07 -07:00
1 parent 28aa5ec756
commit 04617cbf7f
1 file changed
+1
+1
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',