Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mina chokes handling STDIN #286

Closed
Bilge opened this issue Mar 9, 2015 · 9 comments
Closed

Mina chokes handling STDIN #286

Bilge opened this issue Mar 9, 2015 · 9 comments

Comments

@Bilge
Copy link
Contributor

Bilge commented Mar 9, 2015

If SSH causes prompts for any reason, such as password or host key verification prompts, although Mina will permit entering a response it does not handle the input and freezes indefinitely.

@zmckenzie
Copy link

Which term mode are you using? Pretty will not work for STDIN you'll need to change it to system if you want to be able to interact.

set :term_mode, :system

@Bilge
Copy link
Contributor Author

Bilge commented Mar 11, 2015

I appreciate the tip, but "pretty" mode is the default and still seems pretty broken. Why can't they work together?

@zmckenzie
Copy link

I agree with you 100%. I would prefer to use "pretty" mode however I wanted to let you know that there is a workaround. Hopefully the maintainers are able to fix the "pretty" mode to be able to support interaction.

@Bilge
Copy link
Contributor Author

Bilge commented Apr 22, 2015

This no longer seems to be an issue since upgrading from 0.3.2 to 0.3.4 but I am unable to find the commit that would have fixed this.

@d4be4st d4be4st closed this as completed Jul 5, 2015
@Frexuz
Copy link

Frexuz commented Nov 18, 2016

Having the same problem in 1.x. Tried :term_mode, :system but no difference.

-----> Loading rbenv
       rbenv: /home/deployer/.rbenv/versions/2.3.1 already exists

^C
-----> Mina: SIGINT received.
       continue with installation? (y/N) 
 !     Run Error

@zmckenzie
Copy link

@Frexuz Would you be able to provide the output with the --trace flag? I'm not running rbenv and would like to see what else is running around this issue.

@Frexuz
Copy link

Frexuz commented Nov 18, 2016

bundle exec mina provision:rbenv --trace
** Invoke staging (first_time)
** Execute staging
** Invoke provision:rbenv (first_time)
** Execute provision:rbenv
** Invoke rbenv:load (first_time)
** Execute rbenv:load
** Invoke debug_configuration_variables (first_time)
** Execute debug_configuration_variables
** Invoke run_commands (first_time)
** Execute run_commands
[email protected]'s password: 
         % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                        Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  1381  100  1381    0     0   2308      0 --:--:-- --:--:-- --:--:--  2308
       From https://github.com/sstephenson/rbenv
        * branch            master     -> FETCH_HEAD
       Already up-to-date.
       Pulling rbenv-vars updates.
       Already up-to-date.
       Pulling ruby-build updates.
       Already up-to-date.
       Pulling rbenv-default-gems updates.
       Already up-to-date.
       Pulling rbenv-gem-rehash updates.
       Already up-to-date.
       Pulling rbenv-installer updates.
       Already up-to-date.
       Pulling rbenv-bootstrap updates.
       Already up-to-date.
       Pulling rbenv-update updates.
       Already up-to-date.
       Pulling rbenv-whatis updates.
       Already up-to-date.
       Pulling rbenv-use updates.
       Already up-to-date.

       Seems you still have not added 'rbenv' to the load path:

       # ~/.bash_profile:

       export RBENV_ROOT="${HOME}/.rbenv"

       if [ -d "${RBENV_ROOT}" ]; then
         export PATH="${RBENV_ROOT}/bin:${PATH}"
         eval "$(rbenv init -)"
       fi

-----> Loading rbenv
       rbenv: /home/deployer/.rbenv/versions/2.3.1 already exists
^C
-----> Mina: SIGINT received.
       continue with installation? (y/N) 
 !     Run Error

with the script:

set :ruby_version, '2.3.1'

namespace :provision do
  desc "Install ruby #{fetch(:ruby_version)} with rbenv"
  task :rbenv do
    command "curl -L https://raw.github.com/fesplugas/rbenv-installer/master/bin/rbenv-installer | bash"
    invoke :'rbenv:load'
    command "rbenv install #{fetch(:ruby_version)}" # this row that awaits input if already existing
    command "rbenv global #{fetch(:ruby_version)}"
    command "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc"
    command "gem install bundler"
    command "rbenv rehash"
  end
end

@d4be4st
Copy link
Member

d4be4st commented Nov 18, 2016

https://github.com/mina-deploy/mina/blob/master/docs/faq.md#--mina-hangs-after-i-type-my-password-in

@Frexuz
Copy link

Frexuz commented Nov 18, 2016

My bad :) Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants