@@ -252,8 +252,11 @@ export default class Java_gradle extends Base_java {
252
252
#getProperties( manifestPath , opts ) {
253
253
let gradle = this . selectToolBinary ( manifestPath , opts )
254
254
try {
255
- let properties = this . _invokeCommand ( gradle , [ 'properties' ] , { cwd : path . dirname ( manifestPath ) } )
256
- return properties . toString ( )
255
+ const manifestDir = path . normalize ( path . dirname ( manifestPath ) ) ;
256
+ const commandResult = this . _invokeCommand ( gradle , [ 'properties' ] , {
257
+ cwd : manifestDir
258
+ } )
259
+ return commandResult . toString ( )
257
260
} catch ( error ) {
258
261
throw new Error ( `Couldn't get properties of ${ this . _getManifestName ( ) } file , Error message returned from gradle binary => ${ EOL } ${ error . message } ` )
259
262
}
@@ -284,7 +287,10 @@ export default class Java_gradle extends Base_java {
284
287
#getDependencies( manifest , opts = { } ) {
285
288
const gradle = this . selectToolBinary ( manifest , opts )
286
289
try {
287
- const commandResult = this . _invokeCommand ( gradle , [ 'dependencies' ] , { cwd : path . dirname ( manifest ) } )
290
+ const manifestDir = path . normalize ( path . dirname ( manifest ) ) ;
291
+ const commandResult = this . _invokeCommand ( gradle , [ 'dependencies' ] , {
292
+ cwd : manifestDir
293
+ } )
288
294
return commandResult . toString ( )
289
295
} catch ( error ) {
290
296
throw new Error ( `Couldn't run gradle dependencies command, error message returned from gradle binary => ${ EOL } ${ error . message } ` )
0 commit comments