File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 11const {
22 spawnSync
33} = require ( 'child_process' ) ;
4- const { join} = require ( 'path' )
4+ const path = require ( 'path' )
5+ const { existsSync} = require ( 'fs' )
56
67function determineGradleCommand ( debugLog ) {
78 let gradleCommand = null
@@ -12,17 +13,18 @@ function determineGradleCommand(debugLog) {
1213 debugLog ( 'isWindows: ' + isWindows )
1314 const gradleWrapperFile = isWindows ? 'gradlew.bat' : 'gradlew'
1415
15- const gradleWrapperFilePath = join ( './' , gradleWrapperFile )
16-
17- debugLog ( `Checking if wrapper file ${ gradleWrapperFilePath } exists` )
18- if ( existsSync ( gradleWrapperFilePath ) ) {
16+ debugLog ( `Checking if wrapper file ${ gradleWrapperFile } exists` )
17+ if ( existsSync ( gradleWrapperFile ) ) {
1918 debugLog ( 'Wrapper file exists' )
2019 gradleCommand = ( isWindows ? '' : './' ) + gradleWrapperFile
2120 gradleWrapper = true
2221 } else {
2322 debugLog ( 'Wrapper file not found' )
2423 }
25- } catch ( err ) { }
24+ } catch ( err ) {
25+ debugLog ( 'Error trying to determine gradle command.' )
26+ debugLog ( err )
27+ }
2628
2729 if ( ! gradleCommand ) {
2830 const gradleVersion = spawnSync ( 'gradle' , [ '--version' ] )
You can’t perform that action at this time.
0 commit comments