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

Does not respect the :use_sudo, false flag #12

Open
ressu opened this issue Jul 11, 2013 · 4 comments
Open

Does not respect the :use_sudo, false flag #12

ressu opened this issue Jul 11, 2013 · 4 comments
Assignees

Comments

@ressu
Copy link

ressu commented Jul 11, 2013

While I understand that it's impossible to install required packages without root privileges, rbenv:setup tries to use sudo even if the use of sudo is forbidden.

A more suitable solution would be to either tell the user which packages are required for installation or just simply fail the task.

@ghost ghost assigned yyuu Jul 11, 2013
@yyuu
Copy link
Owner

yyuu commented Jul 11, 2013

Sounds reasonable. I will try to abort task with messages about missing dependencies if :use_sudo set as false.

@yyuu
Copy link
Owner

yyuu commented Jul 11, 2013

In Capistrano 2.x, the :use_sudo just indicates that the application will be deployed via sudo or not. I don't believe :use_sudo is the appropriate global flag to determine whether the user can invoke commands via sudo or not.

If you don't like capistrano-rbenv to install packages, setting :rbenv_install_packages as false will prevent package installation from capistrano-rbenv. You can manage packages via Chef, Puppet or other tools.

Though, improving error logging on failed package installation is still helpful. I'd like to work for it.

@ressu
Copy link
Author

ressu commented Jul 11, 2013

This isn't a major issue for me either, I just do the initial setup manually and after that things are just peachy. I opened the issue mostly because it might be confusing to someone not too familiar on what is actually happening and why things are failing.

I think I'll still set :rbenv_install_packages to false in any case for my project. There is no point in inspecting the environment if there is nothing to be done if something is wrong.

@yyuu
Copy link
Owner

yyuu commented Jul 12, 2013

Added message on failed package installation at 5d24339.

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

2 participants