aboutsummaryrefslogtreecommitdiffstats
path: root/build.gradle
diff options
context:
space:
mode:
authorIvan Dubrov <idubrov@guidewire.com>2015-07-08 12:57:14 -0700
committerIvan Dubrov <idubrov@guidewire.com>2015-07-08 12:57:14 -0700
commitb217430b13678ea14db7b37aea4fc8e77b7518d9 (patch)
tree1fff5bf1d9d9670db158f32c4481a863e7c75107 /build.gradle
parenta0446575db678bb699100e0f003c580b883c86ef (diff)
downloaddcevm-b217430b13678ea14db7b37aea4fc8e77b7518d9.tar.gz
dcevm-b217430b13678ea14db7b37aea4fc8e77b7518d9.zip
Fixing Mercurial MQ extension check
Diffstat (limited to 'build.gradle')
-rw-r--r--build.gradle12
1 files changed, 6 insertions, 6 deletions
diff --git a/build.gradle b/build.gradle
index 3bbdb30c..de9ebce7 100644
--- a/build.gradle
+++ b/build.gradle
@@ -36,19 +36,19 @@ project('hotspot') {
task checkMercurial(description: 'Verify Mercurial is installed') << {
def os = new ByteArrayOutputStream()
try {
- exec {
+ def result = exec {
executable 'hg'
- args 'help', 'init'
+ args 'help', 'qinit'
standardOutput = os
errorOutput = os
+ ignoreExitValue = true
+ }
+ if (result.getExitValue() != 0) {
+ throw new GradleException("Mercurial does not have mq extension installed! Consult README.md for details.")
}
} catch (GradleException e) {
throw new GradleException("Failed to execute 'hg'. Make sure you have Mercurial installed!")
}
- def str = os.toString()
- if (!str.contains('--mq')) {
- throw new GradleException("Mercurial does not have mq extension installed! Consult README.md for details.")
- }
}
task init(description: 'Initialize HotSpot repository', dependsOn: checkMercurial) << {