mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
cli: fix reading of client tunnel commands (#177919)
.read_line() appends to the string, so this caused the first command entered to always be read again
This commit is contained in:
parent
94402be603
commit
349c62ab30
|
@ -50,6 +50,8 @@ pub async fn start_singleton_client(args: SingletonClientArgs) -> bool {
|
|||
thread::spawn(move || {
|
||||
let mut input = String::new();
|
||||
loop {
|
||||
input.truncate(0);
|
||||
|
||||
match std::io::stdin().read_line(&mut input) {
|
||||
Err(_) | Ok(0) => return, // EOF or not a tty
|
||||
_ => {}
|
||||
|
|
Loading…
Reference in a new issue