Skip to content

Commit b70023c

Browse files
throw error received only if binary is installed on the system
1 parent 7f845d4 commit b70023c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libraries/Executor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,8 @@ class Executor {
304304

305305
const {error, stderr} = await this.#executeFile(binaryFilepath, ['--no-defaults', `--datadir=${datadir}`, '--initialize-insecure'])
306306

307-
if (error) {
308-
this.logger.error('An error occurred while initializing database with the ', binary.installedOnSystem ? 'system-installed MySQL binary:' : 'downloaded MySQL binary:', error)
307+
if (binary.installedOnSystem && error) {
308+
this.logger.error('An error occurred while initializing database with the system-installed MySQL binary:', error)
309309
throw `An error occurred while initializing the MySQL database: ${error}`
310310
}
311311

0 commit comments

Comments
 (0)