We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2ba93d3 commit 5b7b42dCopy full SHA for 5b7b42d
1 file changed
noshell/src/console.rs
@@ -148,7 +148,14 @@ where
148
}
149
150
// Prepare arguments.
151
- let argv: Vec<_, ARGV_BUFFER_CAPACITY> = line::lexer::split(&line).try_collect()?;
+ let argv: Vec<_, ARGV_BUFFER_CAPACITY> = match line::lexer::split(&line).try_collect() {
152
+ Ok(argv) => argv,
153
+
154
+ Err(line::lexer::Error::Unexpected(tokens)) => {
155
+ noterm::println!(output, "unexpected tokens `{}`", tokens);
156
+ return Err(Error::Cancelled);
157
+ }
158
+ };
159
160
self.execute(&argv).await?;
161
Ok(())
0 commit comments