Skip to content

Commit 17a7fa0

Browse files
authored
fixed cli-parsing of id <text-input> command (#1089)
1 parent 7a809dd commit 17a7fa0

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

debugger/src/main.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,13 @@ impl Cli {
154154
println!("expected filename, usage: i(input) <filename>");
155155
}
156156
}
157-
x if x.starts_with("id ") => {
158-
let input = &command[3..];
159-
self.context.load_input_direct(input.to_owned());
157+
x if x.starts_with("id") => {
158+
let input_text = Self::extract_arg(command);
159+
if let Some(input_text) = input_text {
160+
self.context.load_input_direct(input_text.to_owned());
161+
} else {
162+
println!("expected input text, usage: id <input text>");
163+
}
160164
}
161165
breakpoint if "breakpoint".starts_with(breakpoint) => {
162166
let rule = Self::extract_arg(command);

0 commit comments

Comments
 (0)