-
Notifications
You must be signed in to change notification settings - Fork 37
Installation errors should break the build #104
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,4 +23,12 @@ class Install extends AdbTask { | |
customFlags ?: '' | ||
} | ||
|
||
@Override | ||
protected handleCommandOutput(def text) { | ||
super.handleCommandOutput(text) | ||
def matcher = text =~ /Failure \[(.*?)\]/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Somewhat hacky, but fine with me as long at it fixes the behaviour. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know with Nougat release, Android team did a lot of refactoring in adb. I remember I listened in this podcast. They know forward exit code and error stream of the command being run on the device when we run Unfortunately There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here is the report to ⭐️ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
if (matcher) { | ||
throw new GroovyRuntimeException("Installation failed with error: ${matcher[0][1]}") | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also decided to use
simpleName
here. The name was too verbose. Now it just saysDevice
which makes sense.