{a b} invalid brace pattern causes a panic
Created by: xfix
Reproduction: [describe how you are able to reproduce ("trigger") this bug/issue.]
xfix:/# echo {a b}
Expected behavior: [describe the behavior you would expect the repro to yield.]
not panic, just an error
Actual behavior: [describe the actual behavior, which is presented through the repro.].
thread '<unnamed>' panicked at 'ion: fatal error with syntax validation: unterminated brace', /home/xfix/.cargo/registry/src/github.com-1ecc6299db9ec823/ion-shell-1.0.5/src/parser/shell_expand/words.rs:822
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
at ./checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
1: std::panicking::default_hook::{{closure}}
at ./checkout/src/libstd/sys_common/backtrace.rs:71
at ./checkout/src/libstd/sys_common/backtrace.rs:60
at ./checkout/src/libstd/panicking.rs:355
2: std::panicking::rust_panic_with_hook
at ./checkout/src/libstd/panicking.rs:371
at ./checkout/src/libstd/panicking.rs:549
3: std::panicking::begin_panic
at ./checkout/src/libstd/panicking.rs:511
4: <ion::parser::shell_expand::words::WordIterator<'a> as core::iter::iterator::Iterator>::next
at ./home/xfix/.cargo/registry/src/github.com-1ecc6299db9ec823/ion-shell-1.0.5/src/parser/shell_expand/words.rs:822
at ./home/xfix/.cargo/registry/src/github.com-1ecc6299db9ec823/ion-shell-1.0.5/src/parser/shell_expand/words.rs:988
5: ion::parser::shell_expand::expand_string
at ./home/xfix/.cargo/registry/src/github.com-1ecc6299db9ec823/ion-shell-1.0.5/src/parser/shell_expand/mod.rs:142
6: ion::shell::Shell::run_pipeline
at ./home/xfix/.cargo/registry/src/github.com-1ecc6299db9ec823/ion-shell-1.0.5/src/shell/job.rs:37
at ./checkout/src/libcore/ops.rs:2731
at ./checkout/src/libcore/option.rs:398
at ./checkout/src/libcore/iter/mod.rs:1880
at ./home/xfix/.cargo/registry/src/github.com-1ecc6299db9ec823/ion-shell-1.0.5/src/shell/job.rs:37
at ./home/xfix/.cargo/registry/src/github.com-1ecc6299db9ec823/ion-shell-1.0.5/src/parser/peg.rs:46
at ./home/xfix/.cargo/registry/src/github.com-1ecc6299db9ec823/ion-shell-1.0.5/src/shell/mod.rs:496
7: <ion::shell::Shell<'a> as ion::shell::flow::FlowLogic>::execute_toplevel
at ./home/xfix/.cargo/registry/src/github.com-1ecc6299db9ec823/ion-shell-1.0.5/src/shell/flow.rs:503
8: <ion::shell::Shell<'a> as ion::shell::flow::FlowLogic>::on_command
at ./home/xfix/.cargo/registry/src/github.com-1ecc6299db9ec823/ion-shell-1.0.5/src/shell/flow.rs:58
9: ion::inner_main
at ./home/xfix/.cargo/registry/src/github.com-1ecc6299db9ec823/ion-shell-1.0.5/src/shell/mod.rs:403
at ./home/xfix/.cargo/registry/src/github.com-1ecc6299db9ec823/ion-shell-1.0.5/src/main.rs:68
fish: 'env RUST_BACKTRACE=1 ~/.cargo...' terminated by signal SIGABRT (Abort)
Build information: [output of rustc -V
, git rev-parse HEAD
, qemu-i386 -version
, uname -a
, etc.]
installed using cargo install ion-shell
, no git repository, no qemu
~ $ rustc -V
rustc 1.19.0-nightly (f89d8d184 2017-05-30)
~ $ uname -a
Linux orange 4.11.9-1-ARCH #1 SMP PREEMPT Wed Jul 5 18:23:08 CEST 2017 x86_64 GNU/Linux