Skip to content

Commit e7723b6

Browse files
swissspidyCopilot
andauthored
Update src/Context/FeatureContext.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent e24a518 commit e7723b6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Context/FeatureContext.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1654,6 +1654,9 @@ public function install_wp( $subdir = '', $version = '' ): void {
16541654
$sqlite_source = "$run_dir/wp-content/database/.ht.sqlite";
16551655
if ( file_exists( $sqlite_source ) ) {
16561656
copy( $sqlite_source, "{$install_cache_path}.sqlite" );
1657+
} elseif ( file_exists( "{$install_cache_path}.sqlite" ) ) {
1658+
// Ensure we don't keep a stale cached SQLite DB if the source wasn't produced
1659+
unlink( "{$install_cache_path}.sqlite" );
16571660
}
16581661
}
16591662
}

0 commit comments

Comments
 (0)