pacaur icon indicating copy to clipboard operation
pacaur copied to clipboard

Provider selection crashes upon pressing arrow keys.

Open kamnxt opened this issue 8 years ago • 4 comments

When trying to install something which can have multiple providers, you get this:

Enter a number (default=0): 

If you press any arrow key, this happens:

:: invalid number: 
                   /usr/bin/pacaur: line 442: [[:  syntax error: operand expected (error token is ")
/usr/bin/pacaur: line 442: [[:  syntax error: operand expected (error token is ")
/usr/bin/pacaur: line 457:  syntax error: operand expected (error token is ")

kamnxt avatar Mar 28 '16 20:03 kamnxt

Thanks for the report, I can indeed reproduce.

rmarquis avatar Mar 29 '16 12:03 rmarquis

Try replacing all instances of read -n with read -r -n.

https://github.com/koalaman/shellcheck/wiki/SC2162

AladW avatar Mar 30 '16 15:03 AladW

Thanks, done in c47a95a6b31ed94b6e71d3662ea7829718484ce4. This does however not fix the mentioned issue.

rmarquis avatar Mar 31 '16 09:03 rmarquis

Relevant documentation.

rmarquis avatar Apr 02 '16 09:04 rmarquis