lib/capistrano/tasks/nginx.rake
# prepend :sudo to list if arguments if :key is in :nginx_use_sudo_for list
prepend :sudo to list if arguments if :key is in :nginx_use_sudo_for list
prepend : sudo to list if arguments if : key is in : nginx_use_sudo_for list
def valid_nginx_config?
    test_sudo = nginx_use_sudo?('nginx:configtest') ? 'sudo ' : ''
    nginx_service = fetch(:nginx_service_path)
    test "[ $(#{test_sudo}#{nginx_service} configtest | grep -c 'fail') -eq 0 ]"
  end
def valid_nginx_config? test_sudo = nginx_use_sudo? ( 'nginx:configtest' ) ? 'sudo ' : '' nginx_service = fetch ( :nginx_service_path ) test "[ $(#{test_sudo}#{nginx_service} configtest | grep -c 'fail') -eq 0 ]" end
prepend :sudo to list if arguments if :key is in :nginx_use_sudo_for list
prepend : sudo to list if arguments if : key is in : nginx_use_sudo_for list