Skip to content

zowe --available-commands fails with stack trace when running in daemon mode #2429

Open
@adam-wolfe

Description

Describe the bug

If I am running Zowe CLI in daemon mode and run the zowe --available-commands command Zowe CLI fails with Unexpected Command Error and prints out a stack trace. No error is produced if not running in daemon mode.

The --available-commands flag works in daemon mode when not run at the root level (e.g., zowe files list --available commands).

Expected and actual results

Describe your environment

Zowe CLI v8.11.0
OS: Windows 10

Additional context

The error message and stack trace:

PS C:\> zowe --available-commands
Unexpected Command Error:
Please review the message and stack below.
Contact the creator of handler:
"C:\Users\me\AppData\Roaming\npm\node_modules\@zowe\cli\node_modules\@zowe\imperative\lib\imperative\src/handlers/DefaultRootCommandHandler"
Message:
TextUtils_1.TextUtils.chalk[ImperativeConfig_1.ImperativeConfig.instance.loadedConfig.primaryTextColor] is not a function
Stack:
TypeError: TextUtils_1.TextUtils.chalk[ImperativeConfig_1.ImperativeConfig.instance.loadedConfig.primaryTextColor] is not a function
    at Imperative.highlightWithPrimaryColor (C:\Users\me\AppData\Roaming\npm\node_modules\@zowe\cli\node_modules\@zowe\imperative\lib\imperative\src\Imperative.js:355:119)
    at C:\Users\me\AppData\Roaming\npm\node_modules\@zowe\cli\node_modules\@zowe\imperative\lib\imperative\src\handlers\DefaultRootCommandHandler.js:52:77
    at Array.forEach (<anonymous>)
    at DefaultRootCommandHandler.<anonymous> (C:\Users\me\AppData\Roaming\npm\node_modules\@zowe\cli\node_modules\@zowe\imperative\lib\imperative\src\handlers\DefaultRootCommandHandler.js:50:25)
    at Generator.next (<anonymous>)
    at C:\Users\me\AppData\Roaming\npm\node_modules\@zowe\cli\node_modules\@zowe\imperative\lib\imperative\src\handlers\DefaultRootCommandHandler.js:18:71
    at new Promise (<anonymous>)
    at __awaiter (C:\Users\me\AppData\Roaming\npm\node_modules\@zowe\cli\node_modules\@zowe\imperative\lib\imperative\src\handlers\DefaultRootCommandHandler.js:14:12)
    at DefaultRootCommandHandler.process (C:\Users\me\AppData\Roaming\npm\node_modules\@zowe\cli\node_modules\@zowe\imperative\lib\imperative\src\handlers\DefaultRootCommandHandler.js:33:16)
    at CommandProcessor.<anonymous> (C:\Users\me\AppData\Roaming\npm\node_modules\@zowe\cli\node_modules\@zowe\imperative\lib\cmd\src\CommandProcessor.js:465:39)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority-lowLegit issue but cosmetic or nice-to-haveseverity-mediumBug where workaround exists or that doesn't prevent the usage of Zowe. Just makes it more complex.

    Type

    No type

    Projects

    • Status

      Low Priority

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions