Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI: Fix handling of command options in help display #8476

Merged
merged 1 commit into from Nov 5, 2020

Conversation

medikoo
Copy link
Contributor

@medikoo medikoo commented Nov 5, 2020

Listing help for commands with no options object configured, resulted with following error:

 Type Error ---------------------------------------------
 
  TypeError: Cannot convert undefined or null to object
      at Function.entries (<anonymous>)
      at CLI.displayCommandOptions (/Users/medikoo/npm-packages/serverless/lib/classes/CLI.js:154:12)
      at CLI.generateCommandsHelp (/Users/medikoo/npm-packages/serverless/lib/classes/CLI.js:353:10)
      at CLI.displayHelp (/Users/medikoo/npm-packages/serverless/lib/classes/CLI.js:116:16)
      at Serverless.run (/Users/medikoo/npm-packages/serverless/lib/Serverless.js:147:18)
      at /Users/medikoo/npm-packages/serverless/scripts/serverless.js:50:26
 

It's a regression introduced with #8280

This patch fixes that

@medikoo medikoo self-assigned this Nov 5, 2020
@codecov-io
Copy link

Codecov Report

Merging #8476 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #8476   +/-   ##
=======================================
  Coverage   87.37%   87.37%           
=======================================
  Files         255      255           
  Lines        9472     9472           
=======================================
  Hits         8276     8276           
  Misses       1196     1196           
Impacted Files Coverage Δ
lib/classes/CLI.js 93.36% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c0a2ecf...6b46ae0. Read the comment docs.

@medikoo medikoo merged commit 2fffb16 into master Nov 5, 2020
@medikoo medikoo deleted the 1105-fix-cli-help-resolution branch November 5, 2020 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants