@@ -200,8 +200,11 @@ export default class Java_gradle extends Base_java {
200
200
#getProperties( manifestPath , opts ) {
201
201
let gradle = this . selectToolBinary ( manifestPath , opts )
202
202
try {
203
- let properties = this . _invokeCommand ( gradle , [ 'properties' ] , { cwd : path . dirname ( manifestPath ) } )
204
- return properties . toString ( )
203
+ const manifestDir = path . normalize ( path . dirname ( manifestPath ) ) ;
204
+ const commandResult = this . _invokeCommand ( gradle , [ 'properties' ] , {
205
+ cwd : manifestDir
206
+ } )
207
+ return commandResult . toString ( )
205
208
} catch ( error ) {
206
209
throw new Error ( `Couldn't get properties of ${ this . _getManifestName ( ) } file , Error message returned from gradle binary => ${ EOL } ${ error . message } ` )
207
210
}
@@ -243,7 +246,10 @@ export default class Java_gradle extends Base_java {
243
246
#getDependencies( manifest , opts = { } ) {
244
247
const gradle = this . selectToolBinary ( manifest , opts )
245
248
try {
246
- const commandResult = this . _invokeCommand ( gradle , [ 'dependencies' ] , { cwd : path . dirname ( manifest ) } )
249
+ const manifestDir = path . normalize ( path . dirname ( manifest ) ) ;
250
+ const commandResult = this . _invokeCommand ( gradle , [ 'dependencies' ] , {
251
+ cwd : manifestDir
252
+ } )
247
253
return commandResult . toString ( )
248
254
} catch ( error ) {
249
255
throw new Error ( `Couldn't run gradle dependencies command, error message returned from gradle binary => ${ EOL } ${ error . message } ` )
0 commit comments