-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve error-handling of Mongo shell commands #1105
Conversation
058107b
to
2758796
Compare
1f872c1
to
ef80327
Compare
@EricJizbaMSFT @PrashanthCorp @nturinski FYI, I was trying to get this finished up yesterday and also greatly simply the algorithm by passing the script to be processed through the command line instead of stdin (which would allow me to use Eric's cpUtils unchanged. Unfortunately, it causes some differences in output that I don't think I can overcome. The problem with using cpUtils is that as currently written the mongo shell execution requires an interactive handshaking with stdin/stdout. Probably giving it a rest until next week, but want to get it out of the way. Also wondered if it would make sense to use the vscode terminal for this (but we'd have to be able to read the output). |
That would've been great if we could just re-use |
It was so close. |
Superseded by #1148 |
This especially should provide accurate error messages instead of "timed out" when the "use db" command fails.
Fixes #838
Also fixes #1104
Possibly fixes error reporting for:
#1071
#988
#852
#820
#794
#1092
The main part is a near-rewrite of shell.ts.
Testcases in OneNote:
![image](https://user-images.githubusercontent.com/6913354/57112768-5b3d2800-6cf6-11e9-98dd-616f8af3ccb7.png)