-
Notifications
You must be signed in to change notification settings - Fork 47
Description
If we launch the following command with a tampered Jobs.json file (replace 'false' value in any job with 'faoylse' for example) exit code returns 0 and everything seems ok while nothing happens.
rd jobs load -v -d=update -p xxx -f /tmp/Jobs.json -F json
The same command with export RD_DEBUG=3 shows what is wrong but still returns en exit code 0 :
INFOS: {"errorCode":"api.error.jobs.import.invalid","apiversion":46,"error":true,"message":"Le document de travail nʼétait pas valide pour le format xml : org.rundeck.app.components.jobs.JobDefinitionException: Job Json Format: Unrecognized token 'faoylse': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')\n at [Source: (InputStreamReader); line: 16, column: 43] (through reference chain: java.util.ArrayList[0])"}
The command should return the correct exit code when it fails.