Why does capistrano check for the absence of the rbenv directory?

I get the following message when I run cap production deployin capistrano 3.

DEBUG [5021b4ce] Running /usr/bin/env [ ! -d /usr/local/rbenv/versions/2.0.0-p451 ] on example.com
DEBUG [5021b4ce] Command: [ ! -d /usr/local/rbenv/versions/2.0.0-p451 ]
DEBUG [5021b4ce] Finished in 0.853 seconds with exit status 1 (failed).

This is rbenvpart c config/deploy.rb.

set :rbenv_type, :system # or :user, depends on your rbenv setup
set :rbenv_ruby, '2.0.0-p451'
set :rbenv_path, '/usr/local/rbenv'
set :rbenv_prefix, "RBENV_ROOT=#{fetch(:rbenv_path)} RBENV_VERSION=#{fetch(:rbenv_ruby)} #{fetch(:rbenv_path)}/bin/rbenv exec"
set :rbenv_map_bins, %w{rake gem bundle ruby rails}
set :rbenv_roles, :all # default value

I thought I Capistranoshould check for the existence of a directory rbenv. Why team [ ! -d #{rbenv_dir}]instead [ -d #{rbenv_dir}]?

+4
source share

Source: https://habr.com/ru/post/1538798/


All Articles