Skip to content

Commit

Permalink
fix: add for errors returned from invoking gradle commands
Browse files Browse the repository at this point in the history
the error message returned from binary

Signed-off-by: Zvi Grinberg <zgrinber@redhat.com>
  • Loading branch information
zvigrinberg committed Apr 18, 2024
1 parent 95c37e1 commit 36e7b5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/providers/java_gradle.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export default class Java_gradle extends Base_java {
try {
properties = this._invokeCommandGetOutput(`${gradle} properties`, path.dirname(manifestPath))
} catch (e) {
throw new Error(`Couldn't get properties of build.gradle file`)
throw new Error(`Couldn't get properties of build.gradle file , Error message returned from gradle binary => ${EOL} ${e.getMessage}`)
}
return properties.toString()
}
Expand Down Expand Up @@ -173,7 +173,7 @@ export default class Java_gradle extends Base_java {
try {
commandResult = this._invokeCommandGetOutput(`${gradle} dependencies`,path.dirname(manifest))
} catch (e) {
throw new Error(`Couldn't run gradle dependencies command`)
throw new Error(`Couldn't run gradle dependencies command, error message returned from gradle binary => ${EOL} ${e.getMessage}`)
}
return commandResult.toString()
}
Expand Down

0 comments on commit 36e7b5e

Please sign in to comment.