Skip to content

Commit 00e5333

Browse files
build 2 - v1.8.1
1 parent 67a010c commit 00e5333

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

dist/src/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,17 @@ async function createDB(opts) {
8383
logger.log('Using MySQL binary version:', binaryInfo.version, 'from URL:', binaryInfo.url);
8484
}
8585
catch (e) {
86+
if (options.version && (0, semver_1.lt)((0, semver_1.coerce)(options.version), constants_1.MIN_SUPPORTED_MYSQL)) {
87+
//The difference between the throw here and the throw above is this throw is because the selected "version" is not supported.
88+
//The throw above is because the system-installed MySQL is out of date and "ignoreUnsupportedSystemVersion" is not set to true.
89+
throw `The selected version of MySQL (${options.version}) is not currently supported by this package. Please choose a different version to use.`;
90+
}
8691
logger.error(e);
8792
if (options.version) {
8893
throw `A MySQL version ${options.version} binary could not be found that supports your OS (${os.platform()} | ${os.version()} | ${os.release()}) and CPU architecture (${os.arch()}). Please check you have the latest version of mysql-memory-server. If the latest version still doesn't support the version you want to use, feel free to make a pull request to add support!`;
8994
}
9095
throw `A MySQL binary could not be found that supports your OS (${os.platform()} | ${os.version()} | ${os.release()}) and CPU architecture (${os.arch()}). Please check you have the latest version of mysql-memory-server. If the latest version still doesn't support your OS and CPU architecture, feel free to make a pull request to add support!`;
9196
}
92-
if ((0, semver_1.lt)(binaryInfo.version, constants_1.MIN_SUPPORTED_MYSQL)) {
93-
//The difference between the throw here and the throw above is this throw is because the selected "version" is not supported.
94-
//The throw above is because the system-installed MySQL is out of date and "ignoreUnsupportedSystemVersion" is not set to true.
95-
throw `The selected version of MySQL (${options.version}) is not currently supported by this package. Please choose a different version to use.`;
96-
}
9797
try {
9898
binaryFilepath = await (0, Downloader_1.downloadBinary)(binaryInfo, options, logger);
9999
}

0 commit comments

Comments
 (0)