From 04617cbf7fb01ccf1b4e76033e2860297b75f6ef Mon Sep 17 00:00:00 2001 From: Joseph Nuthalapati Date: Wed, 30 Sep 2020 20:43:35 +0530 Subject: [PATCH] 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 --- actions/mediawiki | 1 + 1 file changed, 1 insertion(+) diff --git a/actions/mediawiki b/actions/mediawiki index 39430377a..44189ac50 100755 --- a/actions/mediawiki +++ b/actions/mediawiki @@ -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',