Capistrano 3 无用的错误信息
Capistrano 3 useless error message
我试图通过 capistrano 任务弄清楚 运行 这个命令有什么问题。如果我 运行 直接在服务器上 运行 没问题:
desc 'Run npm install on remote server'
task :npm_install do
on roles(:app) do
puts '**** NPM INSTALL ****'
execute "cd /var/www/#{fetch(:application)}/current/hapi && NODE_ENV=#{fetch(:env)} npm install"
end
end
没有多大帮助的错误
$ cap prod deploy:npm_install
**** NPM INSTALL ****
INFO [23ed2aa2] Running /usr/bin/env cd /var/www/myapp/current/hapi && NODE_ENV=prod npm install as myuser@123.456.789.101
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as myuser@123.456.789.101: cd /var/www/myapp/current/hapi && NODE_ENV=prod npm install exit status: 1
cd /var/www/myapp/current/hapi && NODE_ENV=prod npm install stdout: Nothing written
cd /var/www/myapp/current/hapi && NODE_ENV=prod npm install stderr: Nothing written
SSHKit::Command::Failed: cd /var/www/myapp/current/hapi && NODE_ENV=prod npm install exit status: 1
cd /var/www/myapp/current/hapi && NODE_ENV=prod npm install stdout: Nothing written
cd /var/www/myapp/current/hapi && NODE_ENV=prod npm install stderr: Nothing written
Tasks: TOP => deploy:npm_install
(See full trace by running task with --trace)
有什么方法可以通过 capistrano 打开有用的错误消息或远程任务的东西吗运行?
我试图通过 capistrano 任务弄清楚 运行 这个命令有什么问题。如果我 运行 直接在服务器上 运行 没问题:
desc 'Run npm install on remote server'
task :npm_install do
on roles(:app) do
puts '**** NPM INSTALL ****'
execute "cd /var/www/#{fetch(:application)}/current/hapi && NODE_ENV=#{fetch(:env)} npm install"
end
end
没有多大帮助的错误
$ cap prod deploy:npm_install
**** NPM INSTALL ****
INFO [23ed2aa2] Running /usr/bin/env cd /var/www/myapp/current/hapi && NODE_ENV=prod npm install as myuser@123.456.789.101
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as myuser@123.456.789.101: cd /var/www/myapp/current/hapi && NODE_ENV=prod npm install exit status: 1
cd /var/www/myapp/current/hapi && NODE_ENV=prod npm install stdout: Nothing written
cd /var/www/myapp/current/hapi && NODE_ENV=prod npm install stderr: Nothing written
SSHKit::Command::Failed: cd /var/www/myapp/current/hapi && NODE_ENV=prod npm install exit status: 1
cd /var/www/myapp/current/hapi && NODE_ENV=prod npm install stdout: Nothing written
cd /var/www/myapp/current/hapi && NODE_ENV=prod npm install stderr: Nothing written
Tasks: TOP => deploy:npm_install
(See full trace by running task with --trace)
有什么方法可以通过 capistrano 打开有用的错误消息或远程任务的东西吗运行?