mirror of
https://github.com/apache/cordova-android.git
synced 2025-04-22 16:50:45 +08:00
feat: don't filter gradle's stderr anymore (#860)
This commit is contained in:
parent
e26142f43b
commit
e3cc75caff
@ -250,25 +250,8 @@ class ProjectBuilder {
|
|||||||
var wrapper = path.join(this.root, 'gradlew');
|
var wrapper = path.join(this.root, 'gradlew');
|
||||||
var args = this.getArgs(opts.buildType === 'debug' ? 'debug' : 'release', opts);
|
var args = this.getArgs(opts.buildType === 'debug' ? 'debug' : 'release', opts);
|
||||||
|
|
||||||
return spawn(wrapper, args, { stdio: 'pipe' })
|
return spawn(wrapper, args, { stdio: 'inherit' })
|
||||||
.progress(function (stdio) {
|
.catch(function (error) {
|
||||||
if (stdio.stderr) {
|
|
||||||
/*
|
|
||||||
* Workaround for the issue with Java printing some unwanted information to
|
|
||||||
* stderr instead of stdout.
|
|
||||||
* This function suppresses 'Picked up _JAVA_OPTIONS' message from being
|
|
||||||
* printed to stderr. See https://issues.apache.org/jira/browse/CB-9971 for
|
|
||||||
* explanation.
|
|
||||||
*/
|
|
||||||
var suppressThisLine = /^Picked up _JAVA_OPTIONS: /i.test(stdio.stderr.toString());
|
|
||||||
if (suppressThisLine) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
process.stderr.write(stdio.stderr);
|
|
||||||
} else {
|
|
||||||
process.stdout.write(stdio.stdout);
|
|
||||||
}
|
|
||||||
}).catch(function (error) {
|
|
||||||
if (error.toString().indexOf('failed to find target with hash string') >= 0) {
|
if (error.toString().indexOf('failed to find target with hash string') >= 0) {
|
||||||
return check_reqs.check_android_target(error).then(function () {
|
return check_reqs.check_android_target(error).then(function () {
|
||||||
// If due to some odd reason - check_android_target succeeds
|
// If due to some odd reason - check_android_target succeeds
|
||||||
|
Loading…
x
Reference in New Issue
Block a user