MXS-1832: Return 1 on failure
If MaxScale responds with an error, MaxCtrl now returns 1.
This commit is contained in:
@ -21,6 +21,11 @@ function print(out) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function err(out) {
|
||||||
|
print(out)
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
// Mangle the arguments if we are being called from the command line
|
// Mangle the arguments if we are being called from the command line
|
||||||
if (process.argv[0] == process.execPath) {
|
if (process.argv[0] == process.execPath) {
|
||||||
process.argv.shift()
|
process.argv.shift()
|
||||||
@ -29,4 +34,4 @@ if (process.argv[0] == process.execPath) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
maxctrl.execute(process.argv)
|
maxctrl.execute(process.argv)
|
||||||
.then(print, print)
|
.then(print, err)
|
||||||
|
|||||||
Reference in New Issue
Block a user