@@ -5,7 +5,6 @@ import semver from 'semver';
55import { readCliConfig , updateCliConfigWithPartial } from 'cli/lib/cli-config/core' ;
66import { getSqliteVersionFromInstallation } from 'cli/lib/sqlite-integration' ;
77import {
8- getLanguagePacksPath ,
98 getPhpMyAdminPath ,
109 getSqliteCommandPath ,
1110 getSqlitePluginPath ,
@@ -200,34 +199,13 @@ async function copyBundledPhpMyAdmin() {
200199 } ) ;
201200}
202201
203- async function copyBundledLanguagePacks ( ) {
204- const sourceLanguagePacksPath = path . join ( getWpFilesPath ( ) , 'latest' , 'languages' ) ;
205- if ( ! fs . existsSync ( sourceLanguagePacksPath ) ) {
206- return ;
207- }
208- const targetLanguagePacksPath = getLanguagePacksPath ( ) ;
209- const isSourceDirectoryDifferent = await areDirectoriesDifferentBySizeAndMtime (
210- sourceLanguagePacksPath ,
211- targetLanguagePacksPath
212- ) ;
213- if ( isSourceDirectoryDifferent ) {
214- try {
215- await fs . promises . rm ( targetLanguagePacksPath , { recursive : true , force : true } ) ;
216- } catch {
217- // Do nothing if the target directory is missing or corrupted
218- }
219- await recursiveCopyDirectory ( sourceLanguagePacksPath , targetLanguagePacksPath ) ;
220- }
221- }
222-
223202export async function setupServerFiles ( ) {
224203 const steps : [ string , ( ) => Promise < void > ] [ ] = [
225204 [ 'WordPress version' , copyBundledLatestWpVersion ] ,
226205 [ 'SQLite integration' , copyBundledSqlite ] ,
227206 [ 'WP-CLI' , copyBundledWpCli ] ,
228207 [ 'SQLite command' , copyBundledSqliteCommand ] ,
229208 [ 'translations' , copyBundledTranslations ] ,
230- [ 'language packs' , copyBundledLanguagePacks ] ,
231209 [ 'phpMyAdmin' , copyBundledPhpMyAdmin ] ,
232210 ] ;
233211
0 commit comments