-
Notifications
You must be signed in to change notification settings - Fork 86
Closed
Description
Describe the bug
When using @oclif/core@4.3.1, as described in Standalone usage section in the README, the help flag causes an error
To Reproduce
When using standalone class extends Command
❯ node standalone.js --help
› Error: Parsing --help
› Command ls not found.
› See more help with --help
When using Parser.parse(), having added the help flag help: Flags.help()
node_modules/@oclif/core/lib/help/index.js:332
if (config.pjson.oclif?.helpClass) {
^
TypeError: Parsing --help
Cannot read properties of undefined (reading 'pjson')
See more help with --help
at loadHelpClass (/oclif-repro/node_modules/@oclif/core/lib/help/index.js:332:16)
at Object.parse (/oclif-repro/node_modules/@oclif/core/lib/flags.js:114:53)
at parseFlagOrThrowError (/oclif-repro/node_modules/@oclif/core/lib/parser/parse.js:279:39)
at Object.valueFunction (/oclif-repro/node_modules/@oclif/core/lib/parser/parse.js:301:53)
at /oclif-repro/node_modules/@oclif/core/lib/parser/parse.js:420:113
at Array.map (<anonymous>)
at Parser._flags (/oclif-repro/node_modules/@oclif/core/lib/parser/parse.js:420:14)
at Parser.parse (/oclif-repro/node_modules/@oclif/core/lib/parser/parse.js:183:93)
at async Object.parse (/oclif-repro/node_modules/@oclif/core/lib/parser/index.js:21:20)
at async file:///oclif-repro/index.js:4:25
Node.js v20.11.1
Expected behavior
Help is brought up showing appropriate flags/args etc.
Environment (please complete the following information):
- OS & version: MacOS Sequoia
- Shell/terminal & version [e.g. bash-3.2, bash-5.0, zsh 5.8, powershell 7.2.4, cmd.exe, Windows Terminal w/ powershell, etc... ]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels