@@ -5,7 +5,7 @@ import * as fsPromises from 'fs/promises';
55import * as fs from 'fs' ;
66import Logger from "./Logger" ;
77import { GenerateRandomPort } from "./Port" ;
8- import { ExecuteFileReturn , InstalledMySQLVersion , InternalServerOptions , MySQLDB } from "../../types" ;
8+ import { ExecuteFileReturn , DownloadedMySQLVersion , InternalServerOptions , MySQLDB } from "../../types" ;
99import { normalize as normalizePath , resolve as resolvePath } from 'path'
1010import { lockFile , waitForLock } from "./FileLock" ;
1111import { onExit } from "signal-exit" ;
@@ -212,7 +212,7 @@ class Executor {
212212 } )
213213 }
214214
215- getMySQLVersion ( preferredVersion ?: string ) : Promise < InstalledMySQLVersion | null > {
215+ getMySQLVersion ( preferredVersion ?: string ) : Promise < DownloadedMySQLVersion | null > {
216216 return new Promise ( async ( resolve , reject ) => {
217217 if ( process . platform === 'win32' ) {
218218 try {
@@ -225,7 +225,7 @@ class Executor {
225225
226226 this . logger . log ( servers )
227227
228- const versions : { version : string , path : string } [ ] = [ ]
228+ const versions : DownloadedMySQLVersion [ ] = [ ]
229229
230230 for ( const dir of servers ) {
231231 const path = `${ process . env . PROGRAMFILES } \\MySQL\\${ dir } \\bin\\mysqld`
@@ -241,7 +241,7 @@ class Executor {
241241 if ( version === null ) {
242242 return reject ( 'Could not get MySQL version' )
243243 } else {
244- versions . push ( { version : version . version , path} )
244+ versions . push ( { version : version . version , path, installedOnSystem : true } )
245245 }
246246 }
247247
@@ -266,7 +266,7 @@ class Executor {
266266 if ( version === null ) {
267267 reject ( 'Could not get installed MySQL version' )
268268 } else {
269- resolve ( { version : version . version , path : 'mysqld' } )
269+ resolve ( { version : version . version , path : 'mysqld' , installedOnSystem : true } )
270270 }
271271 }
272272 }
@@ -422,7 +422,7 @@ class Executor {
422422 this . logger . log ( 'Finished writing init file' )
423423 }
424424
425- async startMySQL ( options : InternalServerOptions , installedMySQLBinary : InstalledMySQLVersion ) : Promise < MySQLDB > {
425+ async startMySQL ( options : InternalServerOptions , installedMySQLBinary : DownloadedMySQLVersion ) : Promise < MySQLDB > {
426426 this . version = installedMySQLBinary . version
427427 this . removeExitHandler = onExit ( ( ) => {
428428 if ( options . _DO_NOT_USE_cli ) {
0 commit comments