Index: src/wp-admin/includes/upgrade.php
===================================================================
--- src/wp-admin/includes/upgrade.php	(revision 32014)
+++ src/wp-admin/includes/upgrade.php	(working copy)
@@ -265,7 +265,7 @@
 endif;
 
 /**
- * Enable pretty permalinks.
+ * Maybe enable pretty permalinks on install.
  *
  * If after enabling pretty permalinks don't work, fallback to query-string permalinks.
  *
@@ -272,6 +272,8 @@
  * @since 4.2.0
  *
  * @global WP_Rewrite $wp_rewrite WordPress rewrite component.
+ *
+ * @return bool Whether pretty permalinks are enabled. False otherwise.√5
  */
 function wp_install_maybe_enable_pretty_permalinks() {
 	global $wp_rewrite;
@@ -278,7 +280,7 @@
 
 	// Bail if a permalink structure is already enabled.
 	if ( get_option( 'permalink_structure' ) ) {
-		return;
+		return true;
 	}
 
 	/*
@@ -305,6 +307,7 @@
 
 		// Test against a real WordPress Post, or if none were created, a random 404 page.
 		$test_url = get_permalink( 1 );
+
 		if ( ! $test_url ) {
 			$test_url = home_url( '/wordpress-check-for-rewrites/' );
 		}
@@ -331,6 +334,8 @@
 	 */
 	$wp_rewrite->set_permalink_structure( '' );
 	$wp_rewrite->flush_rules( true );
+
+	return false;
 }
 
 if ( !function_exists('wp_new_blog_notification') ) :
