Open scotthovestadt opened 8 years ago
It should run for a single command. Are you saying that the validate for specifically the piped commands doesn't happen? If so, yeah, that's a bit tricky. You would have to throw it in right around here:
https://github.com/dthree/vorpal/blob/master/lib/vorpal.js#L919
Thanks for the pointer. I am going to implement this weekend. I need it.
My tool, each command can take several hours - days even. It renders a progress bar... but I really need to validate all commands in advance. Some of the validation involves HTTP calls.
K got it.
Let's say I have the following commands:
In this use-case, let's say I want to validate the file extension before running a command. I add the validate method, but it won't run until after the whole file has been read in and transformed. In my use-case, that may take hours.
I'd like the validation to run immediately before any command starts running.
@dthree Any thoughts?