我正在使用vagrant开发angular4应用程序。我已安装vagrant-fsnotify plugin以通知文件系统更改以触发热构建。我遇到的问题是当流浪者启动时如何自动运行vagrant fsnotify
?
答案 0 :(得分:1)
每次启动虚拟机时,也许vagrant-trigger可以帮助您运行此命令。一个例子应该是:
user_id day_session rank day_diff
xyz789 2017-11-19 1 1
abc123 2017-11-19 1 1
abc123 2017-11-20 2 1
abc123 2017-11-21 3 1
abc123 2017-11-22 4 1
abc123 2017-11-23 5 1
abc123 2017-11-24 6 1
abc123 2017-11-25 7 1
abc123 2017-11-26 8 1
abc123 2017-11-27 9 1
abc123 2017-11-28 10 1
abc123 2017-11-29 11 1
abc123 2017-11-30 12 1
abc123 2017-12-01 13 1
abc123 2017-12-02 14 1
def456 2017-11-19 1 1
def456 2017-11-20 2 1
def456 2017-11-21 3 1
def456 2017-11-22 4 1
def456 2017-11-23 5 1
def456 2017-11-24 6 1
def456 2017-11-25 7 1
def456 2017-11-26 8 1
def456 2017-11-27 9 1
def456 2017-11-28 10 1
def456 2017-11-29 11 1
def456 2017-11-30 12 1
def456 2017-12-01 13 1
def456 2017-12-02 14 1
def456 2017-12-03 15 1
def456 2017-12-04 16 1
def456 2017-12-05 17 1
def456 2017-12-06 18 1
def456 2017-12-07 19 1
def456 2017-12-08 20 1
def456 2017-12-09 21 1
def456 2017-12-10 22 1
def456 2017-12-11 23 1
def456 2017-12-12 24 1
def456 2017-12-13 25 1
def456 2017-12-14 26 1
def456 2017-12-15 27 1
def456 2017-12-16 28 1
def456 2017-12-17 29 1
def456 2017-12-18 30 1
def456 2017-12-19 31 1
def456 2017-12-20 32 1
def456 2017-12-21 33 1
def456 2017-12-22 34 1
def456 2017-12-23 35 1
def456 2017-12-24 36 1
def456 2017-12-25 37 1
def456 2017-12-26 38 5
def456 2017-12-31 39 1
def456 2018-01-01 40 1
def456 2018-01-02 41 1
def456 2018-01-03 42 1
def456 2018-01-04 43 1
答案 1 :(得分:1)
触发器语句的正确格式为:
# start fsnotify on host after the guest starts
config.trigger.after :up do |trigger|
trigger.run = {inline: "bash -c 'vagrant fsnotify > output.log 2>&1 &'"}
end