dthree / dthree/vorpal

Validate doesn't log errors in downstream sessions

Open
#294 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5.6k
Forks
278
PR merge metrics
No merged PRs in 30d

Description

This is an issue when using vorpal in Vantage, but is, I think, fundamental an issue with vorpal itself.

Vorpal's `_commandSetCallback` only logs errors to local sessions, and `validate` returns any failed validations as errors, so if you are trying to validate commands from other sessions (like in Vantage), the command will fail, but without any logging in either the parent or downstream session.

Source
```
vantage
.command('alwaysfail')
.validate(function (args) {
return "Nothing you do will make this command work."
})
```
Example
```
$ vantage [PORT]
vantage~$ alwaysfail
vantage~$
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.