cortesi / modd

A flexible developer tool that runs processes and responds to filesystem changes
MIT License
2.79k stars 130 forks source link

No such variable: @mods #38

Closed ionelmc closed 6 years ago

ionelmc commented 7 years ago

It woudl appear that if I use absolute path i get error about missing variable.

Eg conf:

/workspace/** {
    prep: echo "mods:" @mods
    prep: echo "dirmods:" @dirmods
}
oblitum commented 7 years ago

This is working for me on last release:

/tmp/mutt/mutt-* {
    prep +onchange: echo "@mods"
}

But I have another issue, the output is like the following:

20:15:11: skipping prep:
20:15:30: prep: echo ".//tmp/mutt/mutt-foo-1001-3996-7005169743704104769"
.//tmp/mutt/mutt-foo-1001-3996-7005169743704104769
>> done (1.494ms)

The absolute path is clearly wrong.

oblitum commented 7 years ago

Another issue I found with absolute paths: if the directory doesn't exist modd will simply terminate with an error telling that lstat failed on such directory because it doesn't exist. I couldn't solve this even with a empty match pattern to try create the directory on script startup. I'd suggest to run the empty match patterns before setting up watching of the other patterns, so that it's possible to do some preparation.

cortesi commented 6 years ago

I'm unable to reproduce the original issue here with the latest version of modd. Let's open a separate ticket for the empty directory issue.