From 00e53331e34050880ad840397ff720bbcd2ec593 Mon Sep 17 00:00:00 2001 From: Sebastian-Webster <84299475+Sebastian-Webster@users.noreply.github.com> Date: Fri, 6 Dec 2024 04:19:50 +1300 Subject: [PATCH] build 2 - v1.8.1 --- dist/src/index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dist/src/index.js b/dist/src/index.js index 8ca6683..e891089 100644 --- a/dist/src/index.js +++ b/dist/src/index.js @@ -83,17 +83,17 @@ async function createDB(opts) { logger.log('Using MySQL binary version:', binaryInfo.version, 'from URL:', binaryInfo.url); } catch (e) { + if (options.version && (0, semver_1.lt)((0, semver_1.coerce)(options.version), constants_1.MIN_SUPPORTED_MYSQL)) { + //The difference between the throw here and the throw above is this throw is because the selected "version" is not supported. + //The throw above is because the system-installed MySQL is out of date and "ignoreUnsupportedSystemVersion" is not set to true. + throw `The selected version of MySQL (${options.version}) is not currently supported by this package. Please choose a different version to use.`; + } logger.error(e); if (options.version) { 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!`; } 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!`; } - if ((0, semver_1.lt)(binaryInfo.version, constants_1.MIN_SUPPORTED_MYSQL)) { - //The difference between the throw here and the throw above is this throw is because the selected "version" is not supported. - //The throw above is because the system-installed MySQL is out of date and "ignoreUnsupportedSystemVersion" is not set to true. - throw `The selected version of MySQL (${options.version}) is not currently supported by this package. Please choose a different version to use.`; - } try { binaryFilepath = await (0, Downloader_1.downloadBinary)(binaryInfo, options, logger); }