mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-26 12:03:28 +08:00
CB-13499: Remove duplicate "setting" in error strings
This commit is contained in:
parent
93efe71080
commit
04fa5d3feb
10
bin/templates/cordova/lib/check_reqs.js
vendored
10
bin/templates/cordova/lib/check_reqs.js
vendored
@ -176,7 +176,7 @@ module.exports.check_java = function () {
|
|||||||
if (javacPath) {
|
if (javacPath) {
|
||||||
// OS X has a command for finding JAVA_HOME.
|
// OS X has a command for finding JAVA_HOME.
|
||||||
var find_java = '/usr/libexec/java_home';
|
var find_java = '/usr/libexec/java_home';
|
||||||
var default_java_error_msg = 'Failed to find \'JAVA_HOME\' environment variable. Try setting setting it manually.';
|
var default_java_error_msg = 'Failed to find \'JAVA_HOME\' environment variable. Try setting it manually.';
|
||||||
if (fs.existsSync(find_java)) {
|
if (fs.existsSync(find_java)) {
|
||||||
return superspawn.spawn(find_java).then(function (stdout) {
|
return superspawn.spawn(find_java).then(function (stdout) {
|
||||||
process.env['JAVA_HOME'] = stdout.trim();
|
process.env['JAVA_HOME'] = stdout.trim();
|
||||||
@ -281,7 +281,7 @@ module.exports.check_android = function () {
|
|||||||
if (path.basename(parentDir) === 'tools' || fs.existsSync(path.join(grandParentDir, 'tools', 'android'))) {
|
if (path.basename(parentDir) === 'tools' || fs.existsSync(path.join(grandParentDir, 'tools', 'android'))) {
|
||||||
maybeSetAndroidHome(grandParentDir);
|
maybeSetAndroidHome(grandParentDir);
|
||||||
} else {
|
} else {
|
||||||
throw new CordovaError('Failed to find \'ANDROID_HOME\' environment variable. Try setting setting it manually.\n' +
|
throw new CordovaError('Failed to find \'ANDROID_HOME\' environment variable. Try setting it manually.\n' +
|
||||||
'Detected \'android\' command at ' + parentDir + ' but no \'tools\' directory found near.\n' +
|
'Detected \'android\' command at ' + parentDir + ' but no \'tools\' directory found near.\n' +
|
||||||
'Try reinstall Android SDK or update your PATH to include valid path to SDK' + path.sep + 'tools directory.');
|
'Try reinstall Android SDK or update your PATH to include valid path to SDK' + path.sep + 'tools directory.');
|
||||||
}
|
}
|
||||||
@ -292,7 +292,7 @@ module.exports.check_android = function () {
|
|||||||
if (path.basename(parentDir) === 'platform-tools') {
|
if (path.basename(parentDir) === 'platform-tools') {
|
||||||
maybeSetAndroidHome(grandParentDir);
|
maybeSetAndroidHome(grandParentDir);
|
||||||
} else {
|
} else {
|
||||||
throw new CordovaError('Failed to find \'ANDROID_HOME\' environment variable. Try setting setting it manually.\n' +
|
throw new CordovaError('Failed to find \'ANDROID_HOME\' environment variable. Try setting it manually.\n' +
|
||||||
'Detected \'adb\' command at ' + parentDir + ' but no \'platform-tools\' directory found near.\n' +
|
'Detected \'adb\' command at ' + parentDir + ' but no \'platform-tools\' directory found near.\n' +
|
||||||
'Try reinstall Android SDK or update your PATH to include valid path to SDK' + path.sep + 'platform-tools directory.');
|
'Try reinstall Android SDK or update your PATH to include valid path to SDK' + path.sep + 'platform-tools directory.');
|
||||||
}
|
}
|
||||||
@ -303,14 +303,14 @@ module.exports.check_android = function () {
|
|||||||
if (path.basename(parentDir) === 'bin' && path.basename(grandParentDir) === 'tools') {
|
if (path.basename(parentDir) === 'bin' && path.basename(grandParentDir) === 'tools') {
|
||||||
maybeSetAndroidHome(path.dirname(grandParentDir));
|
maybeSetAndroidHome(path.dirname(grandParentDir));
|
||||||
} else {
|
} else {
|
||||||
throw new CordovaError('Failed to find \'ANDROID_HOME\' environment variable. Try setting setting it manually.\n' +
|
throw new CordovaError('Failed to find \'ANDROID_HOME\' environment variable. Try setting it manually.\n' +
|
||||||
'Detected \'avdmanager\' command at ' + parentDir + ' but no \'tools' + path.sep + 'bin\' directory found near.\n' +
|
'Detected \'avdmanager\' command at ' + parentDir + ' but no \'tools' + path.sep + 'bin\' directory found near.\n' +
|
||||||
'Try reinstall Android SDK or update your PATH to include valid path to SDK' + path.sep + 'tools' + path.sep + 'bin directory.');
|
'Try reinstall Android SDK or update your PATH to include valid path to SDK' + path.sep + 'tools' + path.sep + 'bin directory.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!process.env['ANDROID_HOME']) {
|
if (!process.env['ANDROID_HOME']) {
|
||||||
throw new CordovaError('Failed to find \'ANDROID_HOME\' environment variable. Try setting setting it manually.\n' +
|
throw new CordovaError('Failed to find \'ANDROID_HOME\' environment variable. Try setting it manually.\n' +
|
||||||
'Failed to find \'android\' command in your \'PATH\'. Try update your \'PATH\' to include path to valid SDK directory.');
|
'Failed to find \'android\' command in your \'PATH\'. Try update your \'PATH\' to include path to valid SDK directory.');
|
||||||
}
|
}
|
||||||
if (!fs.existsSync(process.env['ANDROID_HOME'])) {
|
if (!fs.existsSync(process.env['ANDROID_HOME'])) {
|
||||||
|
Loading…
Reference in New Issue
Block a user