Capistrano & Bash: ignore command exit status

前端 未结 7 589
礼貌的吻别
礼貌的吻别 2021-01-31 14:11

I\'m using Capistrano run a remote task. My task looks like this:

task :my_task do
  run \"my_command\"
end

My problem is that if my_comm

7条回答
  •  被撕碎了的回忆
    2021-01-31 14:44

    The simplest way is to just append true to the end of your command.

      task :my_task do
        run "my_command"
      end
    

    Becomes

      task :my_task do
        run "my_command; true"
      end
    

提交回复
热议问题