File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ import { ChildProcessWithoutNullStreams } from 'child_process'
7070import { COPYFILE_EXCL } from 'constants'
7171
7272import * as handlers from './handlers'
73+ import { existsSync } from 'fs'
7374
7475if ( process . env . NODE_ENV !== 'development' ) {
7576 // handle auto updates
@@ -119,6 +120,8 @@ initializeLogger()
119120
120121// Used to convert `.json` files into the appropriate file extension for the Generator
121122async function migrateJsonGenerator ( ) {
123+ if ( ! existsSync ( GENERATORS_PATH ) ) return
124+
122125 const items = await readdir ( GENERATORS_PATH , { withFileTypes : true } )
123126 const files = items . filter (
124127 ( f ) => f . isFile ( ) && path . extname ( f . name ) === '.json'
@@ -256,13 +259,13 @@ const createWindow = async () => {
256259app . whenReady ( ) . then (
257260 async ( ) => {
258261 await createSplashWindow ( )
259- await migrateJsonGenerator ( )
260262 await initSettings ( )
261263 appSettings = await getSettings ( )
262264 nativeTheme . themeSource = appSettings . appearance . theme
263265
264266 await sendReport ( appSettings . telemetry . usageReport )
265267 await setupProjectStructure ( )
268+ await migrateJsonGenerator ( )
266269 await createWindow ( )
267270 } ,
268271 ( error ) => {
You can’t perform that action at this time.
0 commit comments