dunsmoreb/rvmsh — Issue #18: not giving sudo password 3 times does not abort process
Author: petervandenabeele
Created: 2012-01-01 21:32:07+00:00
State: open

So, the case of Control C is resolved,
but the case of the user not giving the sudo password remains open (see below).

Maybe the value of $? could be used here too?

```
peterv@ASUS:~$ sudo echo "test"
[sudo] password for peterv:
Sorry, try again.
[sudo] password for peterv:
Sorry, try again.
[sudo] password for peterv:
Sorry, try again.
sudo: 3 incorrect password attempts
peterv@ASUS:~$ echo $?
1
peterv@ASUS:~$ sudo echo "test"
[sudo] password for peterv:
test
peterv@ASUS:~$ echo $?
0
```

This is the behaviour that I am not sure is correct
(or maybe it is ...).

```
new@ASUS:~$ /home/peterv/b/github/dunsmoreb/rvmsh/rvm
[sudo] password for new:
Sorry, try again.
[sudo] password for new:
Sorry, try again.
[sudo] password for new:
Sorry, try again.
sudo: 3 incorrect password attempts
RVM was successfully installed at /home/new/.rvm/bin/rvm.
Would you like rvmsh to install the latest ruby (ruby-1.9.3) for you? (Y/n) y
Installing Ruby from source to: /home/new/.rvm/rubies/ruby-1.9.3-p0, this may take a while depending on your cpu(s)...

ruby-1.9.3-p0 - #fetching
ruby-1.9.3-p0 - #downloading ruby-1.9.3-p0, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 9330k 100 9330k 0 0 409k 0 0:00:22 0:00:22 --:--:-- 795k
ruby-1.9.3-p0 - #extracting ruby-1.9.3-p0 to /home/new/.rvm/src/ruby-1.9.3-p0
ruby-1.9.3-p0 - #extracted to /home/new/.rvm/src/ruby-1.9.3-p0
Fetching yaml-0.1.4.tar.gz to /home/new/.rvm/archives
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 460k 100 460k 0 0 150k 0 0:00:03 0:00:03 --:--:-- 240k
Extracting yaml-0.1.4.tar.gz to /home/new/.rvm/src
Prepare yaml in /home/new/.rvm/src/yaml-0.1.4.
Configuring yaml in /home/new/.rvm/src/yaml-0.1.4.
Compiling yaml in /home/new/.rvm/src/yaml-0.1.4.
Installing yaml to /home/new/.rvm/usr
ruby-1.9.3-p0 - #configuring
ruby-1.9.3-p0 - #compiling
ruby-1.9.3-p0 - #installing
Retrieving rubygems-1.8.10
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 243k 100 243k 0 0 699k 0 --:--:-- --:--:-- --:--:-- 1263k
Extracting rubygems-1.8.10 ...
Removing old Rubygems files...
Installing rubygems-1.8.10 for ruby-1.9.3-p0 ...
Installation of rubygems completed successfully.
ruby-1.9.3-p0 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-1.9.3-p0 - #importing default gemsets (/home/new/.rvm/gemsets/)
Install of ruby-1.9.3-p0 - #complete
Using /home/new/.rvm/gems/ruby-1.9.3-p0
Would you like rvmsh to set ruby-1.9.3 as the default ruby for you? (Y/n) n
Congratulations! RVM was successfully installed.
```