此任务有效:
before :publishing, :execute do
exit
end
但这不是:
before :publishing, :execute do
on roles(:web) do
exit
end
end
它说的是:
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as deployer@XXX.XXX.XXX.XXX: exit
SystemExit: exit
Tasks: TOP => deploy:publishing => deploy:execute
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing as deployer@XXX.XXX.XXX.XXX: exit
我需要在on roles(:web)
块内运行exit(因为系统退出基于假设和条件)。
我该如何解决这个问题?
由于