Skip to content

Commit 9ec97e0

Browse files
add message in cli for whether the MySQL version is already installed or not
1 parent 1532dbe commit 9ec97e0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/cli.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ async function main() {
3939
}
4040
console.log('Creating ephemeral MySQL database...')
4141
const db = await createDB(options);
42-
console.log(`A MySQL database has been successfully created with the following parameters:\n\nMySQL Version: ${db.mysql.version} \nUsername: ${db.username} \nDatabase Name: ${db.dbName} \nPort: ${db.port} \nX Plugin Port: ${db.xPort} \nSocket: ${db.socket} \nX Plugin Socket: ${db.xSocket}\n`)
42+
const installedString = db.mysql.versionIsInstalledOnSystem ? 'This MySQL database is using the system-installed version of MySQL.' : 'This MySQl database is using a version of MySQL that is not already installed on this system and was downloaded from the MySQL CDN.'
43+
console.log(`A MySQL database has been successfully created with the following parameters:\n\nMySQL Version: ${db.mysql.version} \n${installedString} \nUsername: ${db.username} \nDatabase Name: ${db.dbName} \nPort: ${db.port} \nX Plugin Port: ${db.xPort} \nSocket: ${db.socket} \nX Plugin Socket: ${db.xSocket}\n`)
4344
if (process.platform === 'win32') {
4445
//The connection information logs will be different for Windows compared to other platforms.
4546
//Windows uses mysqlsh instead of mysql to invoke the client shell, needs a --sql flag to be put into SQL mode, and also does not have a protocol flag.

0 commit comments

Comments
 (0)