You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
set :default_env, { "PATH" => "/opt/php/php-7.1.3/bin:$PATH" }
before 'deploy:started', 'deploy:php_info'
namespace :deploy do
desc "Checking php version"
task :php_info do
on roles(:all) do
execute "php -v"
end
end
end
Note: In SSHKit, the first parameter of the execute / test / capture methods has a special significance. If the first parameter isn't a Symbol, SSHKit assumes that you want to execute the raw command and the as / within / with methods, SSHKit.config.umask and the comand map have no effect.
Although I sympathize – this is one of the more esoteric aspects of Capistrano. If you have any suggestions on how this can be better documented, let us know or feel free to open a PR!
Gemfile.lock:
Printed:
01 php -v
01 PHP 5.5.38 (cli) (built: Dec 10 2016 19:31:59)
Expected
01 php -v
01 PHP 7.1.3 (cli) (built: Mar 18 2017 19:23:29) ( NTS )
echo $PATH
01 echo $PATH
01 /usr/local/bin:/bin:/usr/bin
Expected:
/opt/php/php-7.1.3/bin:/usr/local/bin:/bin:/usr/bin
The text was updated successfully, but these errors were encountered: