Skip to content

Commit

Permalink
Fix cli and update dependabot security dependencies (#1324)
Browse files Browse the repository at this point in the history
`caliper unknowncmd`

fails with a horrible `Cannot read property 'then' of undefined`

this pr gives a more helpful message

Also addressed are a couple of dependencies which dependabot reports as
high severity

Signed-off-by: D <d_kelsey@uk.ibm.com>
  • Loading branch information
davidkel committed Apr 27, 2022
1 parent da99385 commit d699171
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions packages/caliper-cli/caliper.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ let results = yargs
.strict(false)
.argv;

if (!results.thePromise) {
Logger.error(`Unrecognised command: '${results._[0]}'`);
process.exit(1);
}

results.thePromise.then( () => {
// DO NOT EXIT THE PROCESS HERE
// The event loops of the workers are still running at this point
Expand Down
2 changes: 1 addition & 1 deletion packages/caliper-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"js-yaml": "^3.13.1",
"mustache": "^2.3.0",
"mqtt": "3.0.0",
"nconf": "^0.10.0",
"nconf": "0.12.0",
"nconf-yaml": "^1.0.2",
"pidusage": "^1.1.6",
"prom-client": "12.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/caliper-gui-dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@fortawesome/free-brands-svg-icons": "^5.12.1",
"@fortawesome/free-solid-svg-icons": "^5.12.1",
"@fortawesome/react-fontawesome": "^0.1.8",
"axios": "0.21.1",
"axios": "0.21.2",
"bootstrap": "4.4.1",
"chart.js": "^2.9.3",
"d3": "^5.15.0",
Expand Down

0 comments on commit d699171

Please sign in to comment.