vbug: use readline to read expected result (#10037)
parent
d26ac5692e
commit
b34b56ee4e
|
@ -1,6 +1,7 @@
|
||||||
import dl
|
import dl
|
||||||
import net.urllib
|
import net.urllib
|
||||||
import os
|
import os
|
||||||
|
import readline
|
||||||
|
|
||||||
// get output from `v doctor`
|
// get output from `v doctor`
|
||||||
fn get_vdoctor_output(is_verbose bool) string {
|
fn get_vdoctor_output(is_verbose bool) string {
|
||||||
|
@ -153,7 +154,11 @@ fn main() {
|
||||||
confirm_or_exit('An error occured retrieving the information, do you want to continue?')
|
confirm_or_exit('An error occured retrieving the information, do you want to continue?')
|
||||||
}
|
}
|
||||||
|
|
||||||
expected_result := os.input_opt('What did you expect to see? ') or { '' }
|
expected_result := readline.read_line('What did you expect to see? ') or {
|
||||||
|
// Ctrl-C was pressed
|
||||||
|
eprintln('\nCanceled')
|
||||||
|
exit(1)
|
||||||
|
}
|
||||||
// open prefilled issue creation page, or print link as a fallback
|
// open prefilled issue creation page, or print link as a fallback
|
||||||
|
|
||||||
if !is_yes && vdoctor_output.contains('behind V master') {
|
if !is_yes && vdoctor_output.contains('behind V master') {
|
||||||
|
|
Loading…
Reference in New Issue