From 10d7852913f8c06da53ff2db6ff534b608dbc325 Mon Sep 17 00:00:00 2001 From: Tommy Sparber Date: Mon, 10 Aug 2015 11:41:54 +0200 Subject: [PATCH] Fix missleading reservationId parameter error The long parameter for the reservation id is defined as --Id but the error messages leads to an non existent --reservationId parameter. Also `executeFlash` function checks the reservation parameter twice (once already in getAssertReservationId) --- wb.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/wb.js b/wb.js index 0755a4d..9630b81 100755 --- a/wb.js +++ b/wb.js @@ -351,7 +351,7 @@ function getReservationId(options) { function getAssertReservationId(options) { var reservationId = getReservationId(options); if (!reservationId) { - console.error('Parameter "-i,--reservationId" or environment variable WB_RESERVATION missing. Exiting.'); + console.error('Reservation Id parameter "-i,--Id" or environment variable WB_RESERVATION missing. Exiting.'); process.exit(1); } return reservationId; @@ -625,12 +625,6 @@ function executeFlash(options) { var reservationId = getAssertReservationId(options); var jsonConfig; - - if (!reservationId) { - console.error('Parameter "reservationId" missing. Exiting.'); - process.exit(1); - } - var createConfig; if (options.file) {