Skip to content

Problem with exit command #45

@giodamelio

Description

@giodamelio

When I set a simple standalone server, and try to connect to it with the vantage command line, the exit command breaks. It prints exit twice, but I only typed it once.

// Code
var vantageServer = vantage()
vantageServer.banner('Hello World');
vantageServer.listen(5111);
console.log('Vantage server started on port 5111');

// Error
Connecting to 127.0.0.1:5111 using http...
local@makawao~$ exit
local@makawao~$ exit
local@makawao~$ Prompt called when mid prompt...

/home/giodamelio/.nvm/versions/node/v4.0.0/lib/node_modules/vantage/node_modules/vorpal/lib/ui.js:130
      throw new Error('UI Prompt called when already mid prompt.');
      ^

Error: UI Prompt called when already mid prompt.
    at Object.ui.prompt (/home/giodamelio/.nvm/versions/node/v4.0.0/lib/node_modules/vantage/node_modules/vorpal/lib/ui.js:130:13)
    at EventEmitter.vorpal.prompt (/home/giodamelio/.nvm/versions/node/v4.0.0/lib/node_modules/vantage/node_modules/vorpal/lib/vorpal.js:457:8)
    at EventEmitter.vorpal.exit (/home/giodamelio/.nvm/versions/node/v4.0.0/lib/node_modules/vantage/node_modules/vorpal/lib/vorpal.js:1032:12)
    at CommandInstance.<anonymous> (/home/giodamelio/.nvm/versions/node/v4.0.0/lib/node_modules/vantage/node_modules/vorpal/lib/vorpal-commons.js:48:19)
    at EventEmitter.session.execCommandSet (/home/giodamelio/.nvm/versions/node/v4.0.0/lib/node_modules/vantage/node_modules/vorpal/lib/session.js:412:24)
    at EventEmitter.vorpal._exec (/home/giodamelio/.nvm/versions/node/v4.0.0/lib/node_modules/vantage/node_modules/vorpal/lib/vorpal.js:767:18)
    at EventEmitter.vorpal._execQueueItem (/home/giodamelio/.nvm/versions/node/v4.0.0/lib/node_modules/vantage/node_modules/vorpal/lib/vorpal.js:607:10)
    at EventEmitter.vorpal._queueHandler (/home/giodamelio/.nvm/versions/node/v4.0.0/lib/node_modules/vantage/node_modules/vorpal/lib/vorpal.js:591:10)
    at Socket.<anonymous> (/home/giodamelio/.nvm/versions/node/v4.0.0/lib/node_modules/vantage/lib/client.js:236:37)
    at Socket.Emitter.emit (/home/giodamelio/.nvm/versions/node/v4.0.0/lib/node_modules/vantage/node_modules/socket.io-client/node_modules/component-emitter/index.js:134:20)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions